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
I am trying to do some date manipulation on UTCDates, without having timezones get in the way. However when doing calculations that span over DST periods, I am finding the output has a1 hour offset due to DST.
Starting UTC date:
2025-03-30T00:59:00.000Z Action:
Adding 1 year (European timezone) Expected result:
2026-03-30T00:59:00.000Z Actual result:
2026-03-29T23:59:00.000Z
Starting UTC date
2025-03-30T00:59:00.000Z Action:
Adding 3 months (Australian timezone) Expected result:
2025-06-30T00:59:00.000Z Actual result:
2025-06-30T01:59:00.000Z
I am trying to do some date manipulation on UTCDates, without having timezones get in the way. However when doing calculations that span over DST periods, I am finding the output has a1 hour offset due to DST.
Starting UTC date:
2025-03-30T00:59:00.000Z
Action:
Adding 1 year (European timezone)
Expected result:
2026-03-30T00:59:00.000Z
Actual result:
2026-03-29T23:59:00.000Z
Starting UTC date
2025-03-30T00:59:00.000Z
Action:
Adding 3 months (Australian timezone)
Expected result:
2025-06-30T00:59:00.000Z
Actual result:
2025-06-30T01:59:00.000Z
Codepen reference:
https://codepen.io/cheryllaird/pen/azojbxX?editors=1010
The text was updated successfully, but these errors were encountered: