Commit 791bceb1 authored by Chinmay Pendharkar's avatar Chinmay Pendharkar
Browse files

added support for timezones by setting all time fields to UTC

parent 5943b79e
......@@ -78,7 +78,7 @@ var a = {
// Location
_event.location = e.location || null;
// Description
_event.description = e.description || null;
......@@ -115,17 +115,18 @@ var a = {
return (i < 10 ? '0': '') + i;
}
s = d.getFullYear();
s += pad(d.getMonth() + 1);
s += pad(d.getDate());
s = d.getUTCFullYear();
s += pad(d.getUTCMonth() + 1);
s += pad(d.getUTCDate());
if(!dateonly) {
s += 'T';
s += pad(d.getHours());
s += pad(d.getMinutes());
s += pad(d.getSeconds());
s += pad(d.getUTCHours());
s += pad(d.getUTCMinutes());
s += pad(d.getUTCSeconds());
}
s += 'Z';
return s;
}
......@@ -216,7 +217,7 @@ var a = {
if(!cal.generated) {
cal.methods.generate();
}
res.writeHead(200, {
'Content-Type': 'text/calendar',
'Content-Disposition': 'attachment; filename="calendar.ics"'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment