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

set process.env.TZ has no effect #18623

Open
DreamZhou opened this issue Apr 7, 2023 · 0 comments · May be fixed by #27826
Open

set process.env.TZ has no effect #18623

DreamZhou opened this issue Apr 7, 2023 · 0 comments · May be fixed by #27826
Labels
bug Something isn't working correctly node API Related to various "node:*" modules APIs node compat

Comments

@DreamZhou
Copy link

DreamZhou commented Apr 7, 2023

import process from "node:process"

console.log(process.env.TZ);
console.log(new Date().toString());
process.env.TZ = 'Asia/Tokyo';
console.log(new Date().toString());

node(v18.14.1) output

undefined
Fri Apr 07 2023 09:45:27 GMT+0800 (中国标准时间)
Fri Apr 07 2023 10:45:27 GMT+0900 (日本标准时间)

deno output

undefined
Fri Apr 07 2023 09:45:28 GMT+0800 (中国标准时间)
Fri Apr 07 2023 09:45:28 GMT+0800 (中国标准时间)

deno --version

deno 1.32.2 (release, x86_64-apple-darwin)
v8 11.2.214.9
typescript 5.0.3
@dsherret dsherret added bug Something isn't working correctly node compat labels Apr 7, 2023
@bartlomieju bartlomieju added the node API Related to various "node:*" modules APIs label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node API Related to various "node:*" modules APIs node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants