-
Notifications
You must be signed in to change notification settings - Fork 54
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
daylight savings time #31
Comments
If you keep dates and times in UTC, you can safely ignore DST. It should be handled by the time zone conversion automatically. |
Hmm I am keeping all dates in UTC+00 on the server. irb(main):211:0> ScheduledShow.find(438747).start_at
=> Sun, 14 Mar 2021 16:00:00 UTC +00:00
irb(main):212:0> ScheduledShow.find(438747).end_at
=> Sun, 14 Mar 2021 18:00:00 UTC +00:00
I haven't found that to be the case. Whenever DST happens my events are now an hour behind or ahead, and I need to update them accordingly. Is there anything else I might be doing wrong? 🤔 |
Different time zones may or may not have DST and may even have different DST start and end dates. For this reason DST is added by the timezone conversion mechanism. By making sure Ruby/Rails's timezone is explicitly set to UTC you bypass the problem internally. Then whenever you convert a date-time to the user's time zone you add the DST correction whatever it is. Thus if only operating in UTC realm you shouldn't have DST issues. So all you need to make sure is that your default timezone is UTC. Check it in Ruby and also check the corresponding ENV variables to see if it's set or overridden (I think it's |
Still trying to figure this out 2 years later.
|
Hi, thank you for your work on this project I've been using it for years!
I noticed that daylight savings time is not taken into account if you are making a recurrence spanning multiple years. Is it within the scope of the project to fix this?
The text was updated successfully, but these errors were encountered: