Skip to content

Bugfix/broken tz conversion on dst change#3007

Open
PawelPlutaUek20 wants to merge 3 commits intoiamkun:devfrom
PawelPlutaUek20:bugfix/broken-tz-conversion-on-dst-change
Open

Bugfix/broken tz conversion on dst change#3007
PawelPlutaUek20 wants to merge 3 commits intoiamkun:devfrom
PawelPlutaUek20:bugfix/broken-tz-conversion-on-dst-change

Conversation

@PawelPlutaUek20
Copy link
Copy Markdown
Contributor

@PawelPlutaUek20 PawelPlutaUek20 commented Feb 14, 2026

A brief description of why is this needed:

with keepLocalTime, we add the difference of offsets, but of the offsets before adding the timezone diff.

Example: If we add 17 hours from UTC to Australia/Sydney, but within those 17 hours the time went backwards, the hour would be 16 and not 17. That's why after adding the time, we need to add the dst diff.

00:00 ---- 01:00 ---- 02:00 ---- 02:00 ---- 03:00 ---- ...
                      ^ DST ends (clock goes back 1 hour)

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

Successfully merging this pull request may close these issues.

1 participant