Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set the time zone of an event? #54

Open
raxod502 opened this issue Jun 28, 2018 · 4 comments
Open

How to set the time zone of an event? #54

raxod502 opened this issue Jun 28, 2018 · 4 comments

Comments

@raxod502
Copy link

When I put my events into Apple Calendar, they show up as "Time zone: Floating". This makes sense since I didn't provide any time zone to ics.js when I created the events. That leaves the question: how do I provide the time zone?

@Forrest-T
Copy link

This can be done with Date objects (and Date-friendly formatted strings) as described here.
For example, I am writing this at 2018-09-24T22:33:13-07:00

  • 2018-09-24 is the date
  • 22:33:13 is the time
  • -07:00 is the offset of my time zone relative to UTC time

@raxod502
Copy link
Author

Maybe I'm missing something, but that doesn't seem to fix the problem. All adding a time zone does is shift the time. It doesn't actually add a time zone, so I would still expect them to show up as "Time zone: Floating".

@Forrest-T
Copy link

No, I think I might have misunderstood your question. The above can be used to specify a local time in some time zone (i.e. with some offset), which can then be interpreted as "absolute time" when you import the events. I believe Google Calendar, for example, translates events to whatever local time zone you import from (or has an option to do so). On closer inspection, you are probably looking for specifying the time zone for the calendar app using VTIMEZONE, which unfortunately seems to be unimplemented right now :-(

@raxod502
Copy link
Author

Yes, I think you're right. Meanwhile there are alternative projects such as ical-generator which are probably better choices than ics.js for a number of reasons. I'm probably going to be switching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants