derhuerst / ics-service

Create a calendar feed that people can subscribe to.
https://github.com/derhuerst/ics-service#ics-service
ISC License
28 stars 2 forks source link

Timezone/Improved Time Data #2

Open adamchlebek opened 1 year ago

adamchlebek commented 1 year ago

Hello @derhuerst,

Wanted to start off by saying thank you for making one of the only npm packages I could find that allowed me to host an ICS feed! I have been struggling to do some timezone stuff and wanted to see if you had timelines on when you are looking at implementing this? I found this great library that might help out with that (ical-gen-calzone).

Thank you again for your work!

derhuerst commented 1 year ago

Hey,

I have been struggling to do some timezone stuff and wanted to see if you had timelines on when you are looking at implementing this?

If you "just" want to generate calendar feeds for a different timezone, I suggest you to checkout a date/time library like luxon; The date/time notation used by ics (and thus ics-service) is in local "wall clock" time, so you'll have to convert from your timestamp or local time into the right timezone, e.g. using DateTime.fromISO(…).setZone(…).year.

If you want to generate a calendar feed that contains the VTIMEZONE information, then using ical-gen-calzone, or the underlying icalzone rather, would make sense.

derhuerst commented 1 year ago

related: https://github.com/adamgibbons/ics/issues/198