Skip to content

Handle short form timezone reported by some systems #85

@bjuppa

Description

@bjuppa

Our localTimezone() function returns unexpected short form timezone names (e.g. "CET") on some systems. This breaks our tests for localTimezone as well as safeTimezone on those systems.

Seen with Deno 1.39.0 on macOS 14.2

The underlying call is Intl.DateTimeFormat()?.resolvedOptions()?.timeZone

There are no options affecting returned timeZone, so my suggestion is that we rewrite localTimezone to fallback to returning UTC whenever no / can be found in reported timeZone. The short form will not be useful for the UI anyway, for example the short forms will not be available in a dropdown.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions