Skip to content

Fixes timezone bias on Windows#744

Merged
saghul merged 1 commit intomasterfrom
saghul-patch-1
Dec 9, 2024
Merged

Fixes timezone bias on Windows#744
saghul merged 1 commit intomasterfrom
saghul-patch-1

Conversation

@saghul
Copy link
Copy Markdown
Contributor

@saghul saghul commented Dec 9, 2024

GetTimeZoneInformationreturns the bias in minutes already, so no need to adjust it.

Also handle the return code since it determines if the time zone is in the daylight saving range.

Ref: https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation
Fixes: saghul/txiki.js#325

`GetTimeZoneInformation`returns the bias in minutes already, so no need to adjust it.

Also handle the return code since it determines if the time zone is in the daylight saving range.

Ref: https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation
Fixes: saghul/txiki.js#325
@saghul saghul requested a review from bnoordhuis December 9, 2024 21:33
@saghul
Copy link
Copy Markdown
Contributor Author

saghul commented Dec 9, 2024

Hopefully I ended up on the right side of the rabbithole 😅 PTAL @bnoordhuis

@saghul saghul merged commit 53b641d into master Dec 9, 2024
@saghul saghul deleted the saghul-patch-1 branch December 9, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants