goja
goja copied to clipboard
new Date().toString() returns shortened timezone
new Date().toString()
returns: Thu Jan 05 2023 00:16:15 GMT+0100 (CET)
expected Thu Jan 05 2023 00:16:15 GMT+0100 (Central European Standard Time)
The specification leaves the time zone implementation-defined (see https://tc39.es/ecma262/#sec-timezoneestring).
Having said that I wouldn't mind bringing it in line with v8 and Spider Monkey if it was an easy fix. Unfortunately it doesn't look this way: the full localized time zone name is not available from the standard Go library and I could not find any 3rd party library either. If I missed something I'd welcome a PR.
I found that V8 uses https://github.com/unicode-org/icu
https://github.com/unicode-org/icu/blob/main/icu4c/source/data/zone/en.txt
It doesn't look like an easy fix but it would be possible to reuse some of their logic