You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is usually needed to cater for daylight saving in a particular time zone. In this case, you would expect occurrences to always be at 8AM German Time. This, however, corresponds to 6AM UTC on Oct 29th 2022, but 7AM UTC on Oct 30th 2022. Thus, interpreting times as UTC does not work here.
However, after playing and reading around quite a bit I came up with a solution that worked for me:
Consider datetimes in the database as "floating" instead of UTC and do not store any time zone information in it. "Floating" time zones are actually a thing (https://icalendar.org/CalDAV-Access-RFC-4791/7-3-date-and-floating-time.html).
Leveraging the parseFromTimeZone function from date-fns we can adjust them for time zone and daylight savings at the same time, though, and get the expected results:
Is setting a timezone not supported?
The text was updated successfully, but these errors were encountered: