Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodeJS (version 12.21.0) returns wrong timezone offset #3866

Closed
gideonmurugan opened this issue May 19, 2022 · 3 comments
Closed

nodeJS (version 12.21.0) returns wrong timezone offset #3866

gideonmurugan opened this issue May 19, 2022 · 3 comments
Labels

Comments

@gideonmurugan
Copy link

gideonmurugan commented May 19, 2022

We are working on nodejs version v12.21.0 with full icu and we are facing wrong timezone offset issue.
Our requirement is to get correct timezone offset using double symbolic link
For example, /etc/localtime -> /var/localtime -> /usr/share/zoneinfo/America/Guatemala

We are getting these values:

node

Welcome to Node.js v12.21.0.
Type ".help" for more information.

process.versions
{
node: '12.21.0',
v8: '7.8.279.23-node.45',
uv: '1.40.0',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.16.0',
modules: '72',
nghttp2: '1.41.0',
napi: '7',
llhttp: '2.1.3',
http_parser: '2.9.4',
openssl: '1.1.1k',
cldr: '36.1',
icu: '66.1',
tz: '2019c',
unicode: '13.0'
}
new Date().toString()
'Sat Apr 02 2022 03:16:12 GMT-0500 (Central Daylight Time)'

expected output is:

new Date().toString()
'Sat Apr 02 2022 02:16:12 GMT-0600 (Central Standard Time)'

As per our analysis there is some problem with "readlink" so it is not getting correct values.
Also we have compared this version with v8.12.0 there we are getting correct values (till v11.15.0 V8 version is "7.0.276.38" and for version v12.0.0 v8 version is "7.4.288.21").
Further analysis the entier architecture or flow of code is changed from v12.0.0.
In older v8.12.0 version we were getting values by triggering Calandar API and GregorianCalendar API using RUNTIME_FUNCTION (runtime-intl.cc), but this scenario doesn't worked from v12.0.0. Please provide your comments for resolve this issue.

Note:
In Putil.cpp, we observed both stdId & dstID mentioned as [CST & CDT] for america/guatemala. Also from the web we observed there is no daylight for Central America. But in the following array of strcutre, we observed the dstId also mentioned as CDT. Could you please calrify this;

static const struct OffsetZoneMapping OFFSET_ZONE_MAPPINGS[] = {
{21600, 0, "CST", "CDT", "America/Guatemala"},
}

Browser detail:
Time Zone in Guatemala
Guatemala observes Central Standard Time all year. There are no Daylight Saving Time clock changes.

@richardlau
Copy link
Member

See nodejs/node#26880. Suspected to be an ICU bug nodejs/node#26880 (comment).

@nschonni nschonni transferred this issue from nodejs/nodejs.org May 19, 2022
Copy link

github-actions bot commented Mar 7, 2024

There has been no activity on this issue for 11 months. The help repository works best when sustained engagement moves conversation forward. The issue will be closed in 1 month. If you are still experiencing this issue on the latest supported versions of Node.js, please leave a comment.

@github-actions github-actions bot added the stale label Mar 7, 2024
Copy link

github-actions bot commented Apr 6, 2024

Closing after no activity on this issue for 12 months.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants