Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
lib-ical
Commits
43452f43
Commit
43452f43
authored
Sep 04, 2014
by
lee
Browse files
add setTZ
parent
43baa002
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
43452f43
...
...
@@ -50,6 +50,11 @@ Use this method to set your server's hostname. It will be used to generate the f
Use this method to set your feed's name.
### setTZ(timezone)
Use this method to set your feed's timezone.
### setProdID(prodID)
This method is used to overwrite the default ProdID:
...
...
lib/ical-generator.js
View file @
43452f43
...
...
@@ -33,6 +33,10 @@ var a = {
cal
.
name
=
name
.
toString
();
return
cal
.
methods
;
},
setTZ
:
function
(
tz
)
{
cal
.
tz
=
tz
.
toString
();
return
cal
.
methods
;
},
addEvent
:
function
(
e
)
{
var
_event
=
{};
...
...
@@ -154,6 +158,12 @@ var a = {
if
(
cal
.
name
)
{
g
+=
'
X-WR-CALNAME:
'
+
cal
.
name
+
'
\n
'
;
}
if
(
cal
.
tz
)
{
g
+=
'
X-WR-TIMEZONE:
'
+
cal
.
tz
+
'
\n
'
;
}
else
{
g
+=
'
X-WR-TIMEZONE:UTC+8
\n
'
;
}
// Domain
if
(
!
cal
.
domain
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment