Skip to content

Fix the timezones on windows - #9

Merged
pleroy merged 4 commits into
masterfrom
Timezone
May 5, 2026
Merged

Fix the timezones on windows#9
pleroy merged 4 commits into
masterfrom
Timezone

Conversation

@pleroy

@pleroy pleroy commented May 5, 2026

Copy link
Copy Markdown
Member
  1. Don't reference the test time zones, it's silly, the users don't have them.
  2. No point in getting the timezone name from Windows since there is no code to properly build the time zones objects from the Windows database (which is in XML, not TZDB files). We can use "libc:localtime" instead to go through the libc path, since we only ever care about local time.
  3. Fix a sign error, Microsoft counts West, not East.

pleroy added 3 commits May 5, 2026 13:04
This reverts commit 3744292.  Hard-wiring the timezone path works on our machine, but not on the users' machines, which fall back to UTC.

#if defined(_WIN32) || defined(_WIN64)
// Uses the globals: '_timezone', '_dstbias' and '_tzname'.
// NOTE(phl): Microsoft, being in Redmont, counts West and not East.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// NOTE(phl): Microsoft, being in Redmont, counts West and not East.
// NOTE(phl): Microsoft, being in Redmond, counts West and not East.

@pleroy
pleroy merged commit 41cde19 into master May 5, 2026
4 checks passed
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.

2 participants