larrybolt / online-ics-feed-viewer

Online ICS / iCal feed viewer
https://larrybolt.github.io/online-ics-feed-viewer/
MIT License
69 stars 24 forks source link

Timezone Issue #4

Open jemskijemski opened 4 years ago

jemskijemski commented 4 years ago

Hi There:

We are generating a feed that has events timed for Toronto/Eastern Tine timezone. The feeds work perfectly using Google Calendar. On the ics viewer the times are off by a few hours. Looks like the UTC is an issue. Is there a way to specify in the code that the ics-feed-viewer process using the Eastern Standard Time (some offset variable?). Thanks in advance.

jemskijemski commented 4 years ago

What an adventure! I was able to adjust for the timezone issue by editing the moment.js file. I edited the a non-minified version of that. Make sure your html refers to moment.js not moment.min.js!

You would need to change the offset for your particular timezone. This fixed an issue with a feed being generated by our booking system (WebCheckout). I added the following code:

var offset=120;

I placed the above code below what was already there (though that code be remarked out if you wanted).

var offset = this._offset || 0, localAdjust;