marnusw / date-fns-tz

Complementary library for date-fns v2 adding IANA time zone support
MIT License
1.01k stars 112 forks source link

getTimezoneOffset for UTC+[X] does not work #256

Open adamxi opened 8 months ago

adamxi commented 8 months ago

Using getTimezoneOffset with e.g.: "UTC+8" does not work.

Internally the tzParseTimezone function does not use the "patterns.timezone" regex which seems it would have been able to capture the hour offset just fine:

image image