-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Time zone issue on Date #50565
Comments
I have tested on my PC, which time zone is const options = { timeZone: 'Asia/Shanghai' };
const formatter = new Intl.DateTimeFormat('en-US', options); |
I can't reproduce it in Node.js 20.8.0 on Linux: $ TZ='Asia/Shanghai' node -p '[new Date().toString(), process.versions.node]'
[ 'Mon Nov 06 2023 01:25:02 GMT+0800 (China Standard Time)', '20.8.0' ] |
May be related to #50301 which is macOS specific. |
Cannot reproduce on macOS ventura |
See also https://unicode-org.atlassian.net/browse/ICU-22541. Possibly fixed in ICU 74.1 but #50515 will need work to land. |
I execute your command, and it also works for me. Have to set the time zone of macOS to 'Asia/Shanghai' with this command: |
It's good, should I close this issue? |
I'll go ahead and close this. Summary: upstream bug fixed in newer versions. Upgrade pending. |
Any work besides the unit test failures? FyI @sven-oly |
Quick Question for those who know how ICU updates work: Will this end up being backported to current LTS? We are holding off upgrading to 20.x as the majority of our dev team is now on Sonoma. I assume 74.1 won't end up in LTS, but could a patch to 73 go in? |
I'm not sure let me ask about a dot release or patch. I've asked if there's a patch against 73. Does anyone know whether 74 could land in LTS or not? Landing 74 would be easier. |
Version
v20.9.0
Platform
Darwin Devins-MacBook-Air-m2-2022.local 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:57 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8112 arm64
Subsystem
No response
What steps will reproduce the bug?
sudo systemsetup -settimezone Asia/Shanghai
console.log(new Date().toString()
.node timezone.js
Mon Nov 06 2023 00:19:33 GMT+0800 (Central Standard Time)
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
The name of time zone in China is China Standard Time instead of Central Standard Time, the exprected output should be: Mon Nov 06 2023 00:19:33 GMT+0800 (China Standard Time)
What do you see instead?
This Output would display on the terminal
Mon Nov 06 2023 00:19:33 GMT+0800 (Central Standard Time)
Additional information
No response
The text was updated successfully, but these errors were encountered: