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

how to set the timezone for node.js app #36

Closed
Crystal4545 opened this issue Nov 26, 2015 · 3 comments
Closed

how to set the timezone for node.js app #36

Crystal4545 opened this issue Nov 26, 2015 · 3 comments

Comments

@Crystal4545
Copy link

Hi team,
When I debug a node.js app, I'd like the timestamp of the log to be set to a certain timezone. How can I realize that? Can anyone here shed some light on how to set the timezone for node.js app?

@bnoordhuis
Copy link
Member

If you're deploying on UNIX machines, setting the TZ environment variable before starting your application should do it.

@srl295
Copy link
Member

srl295 commented Dec 10, 2015

Yes, the timezone would be set/detected from the underlying OS. On Windows it would be affected by the control panel /configuration settings for date and time.

@Crystal4545
Copy link
Author

@srl295 @bnoordhuis Thank you for your suggestions.
I was once wondering whether there is any runtime environment variables that we can configure to realize that. If no such thing, then okay we can just modify the OS settings. Again. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants