You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not an expert in this package, but I do know that ECMAScript names the UTC time zone differently than the IANA Time Zone Database.
In the IANA source data, the canonical name is Etc/UTC. But ECMAScript has decided, for brevity and clarity's sake, that UTC will be the canonical name for this time zone when used in ECMAScript. To illustrate:
So, depending on the use case, either Etc/UTC or UTC may be used. If the goal is to match how JS code works (both Intl.DateTimeFormat and the upcoming Temporal API) then use UTC. If the goal is to match the IANA TZDB, then use Etc/UTC. Both represent the same time zone, the only difference is which string is the canonical name.
According to readme, when using parameter
includeUtc
, utc time zone can be found underUTC
:tzdb/README.md
Lines 35 to 37 in 23081e3
However, through trial and error, I found out it is actually
Etc/UTC
and not justUTC
:https://codesandbox.io/s/suspicious-david-945pw3?file=/src/App.tsx
Is it supposed to be
UTC
orEtc/UTC
? If it's the second, I can submit PR to update docs.The text was updated successfully, but these errors were encountered: