Skip to content

Conversation

saghul
Copy link
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
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
59 checks passed
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Date() ignores timezome

2 participants