Open asr1 opened 9 years ago
There might be something else going on because my gCal and system time are pacific, yet the imported times were accurate relevant to central time.
That's the tricky part. It isn't all users.
I've tried setting both the calendar and the events to Central, and I tried leveraging Moment.js, but ultimately that moved the time x hours in the wrong direction, where x is the discrepancy between your time and Central. It tried to compensate and it went poorly.
A particularly hacky solution I can think of is to get the user's time zone, find what central's time zone is based on the date (either CST or CDT, depending) , and subtract the two values to get some offset. You could then add this offset to every class time.
But, as I said, this is kind of hacky, and wouldn't work if you import the calendar in a different time zone than you downloaded it.
If it happened 100% of the time it would be a less pernicious issue.
The probable way to fix this is by changing the ics.js file to
'DTSTART;VALUE=DATE-TIME;TZID=US-Central:' + start,
'DTEND;VALUE=DATE-TIME;TZID=US-Central:' + end,
And then changing classSchedFunc.js so that it uses US-Central time instead of the Z (universal time) format. This may create an issue with daylight savings time(?), and is presently low priority.
The present workaround is just to ensure that your Google Calendar is set to Central Time when you import the calendar.