Skip to content

fix: afix: add Windows timezone support for IANA timezone namesdd Windows timezone support for IANA timezone names#118

Open
wirihere wants to merge 1 commit intosteipete:mainfrom
wirihere:windows-timezone-fix
Open

fix: afix: add Windows timezone support for IANA timezone namesdd Windows timezone support for IANA timezone names#118
wirihere wants to merge 1 commit intosteipete:mainfrom
wirihere:windows-timezone-fix

Conversation

@wirihere
Copy link

On Windows, time.LoadLocation() fails to recognize IANA timezone names like "Pacific/Auckland" because Windows uses a different timezone database. This commit adds a fallback mechanism that maps common IANA timezone names to their UTC offsets.

Changes:

  • Add timezone_windows.go with IANA to UTC offset mapping
  • Update all time.LoadLocation calls to use loadLocationWithFallback
  • Add loadLocationWithFallback to config package for validation
  • Supports Pacific/Auckland (+13:00) and other common timezones

Fixes the issue where gogcli calendar commands failed on Windows with "unknown time zone" errors for IANA timezone names.

On Windows, time.LoadLocation() fails to recognize IANA timezone names
like "Pacific/Auckland" because Windows uses a different timezone database.
This commit adds a fallback mechanism that maps common IANA timezone
names to their UTC offsets.

Changes:
- Add timezone_windows.go with IANA to UTC offset mapping
- Update all time.LoadLocation calls to use loadLocationWithFallback
- Add loadLocationWithFallback to config package for validation
- Supports Pacific/Auckland (+13:00) and other common timezones

Fixes the issue where gogcli calendar commands failed on Windows
with "unknown time zone" errors for IANA timezone names.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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