Closed roman-suru closed 2 years ago
What browser? The zones are provided by the Intl API, implemented by the native JS libraries. If you run a browser or Node that doesn't support that zone, you get an error.
I tested Pacific/Kanton on Chrome 103 on MacOs, worked fine. However, it appears to be a relatively recent addition, about a year old: https://mm.icann.org/pipermail/tz/2021-May/030140.html. It's likely that you are just running in an environment that doesn't (yet) support that zone identifier. The workaround would be to use Pacific/Enderbury
instead
Hi there, thanks for the reply. It was no browser but the node 14 runtime for AWS lambdas. Seems likely that it might not support this zone yet.
Describe the bug
To Reproduce
return { 'Pacific/Kanton', utc_offset: IANAZone.create('Pacific/Kanton').offset(Date.now()) }
Actual vs Expected behavior A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
Additional context I searched the internet and found that this user faced a similar problem.