-
Notifications
You must be signed in to change notification settings - Fork 767
Description
Is your feature request related to a problem? Please describe.
I’m using Luxon to validate user-provided IANA timezone strings. Luxon’s DateTime.setZone()
method correctly validates timezones case-insensitively, but it preserves the input casing when accessing zoneName
.
For example, if given america/nEw_york
, zoneName returns america/nEw_york
instead of the canonical America/New_York
.
I would've expected using toFormat('z') to return the correctly cased IANA timezone but it still returns the incorrectly cased user inputted timezone.
From what I can see, Luxon doesn't support normalise or canonicalise IANA timezone names with correct casing... unless it's me doing something wrong?
Describe the solution you'd like
To be able to normalise/canonicalise IANA timezones with correct casing
Describe alternatives you've considered
Manually correct casing comparing to IANA timezone database