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 change timezone #182

Open
erwzqsdsdsf opened this issue Nov 4, 2020 · 2 comments
Open

how to change timezone #182

erwzqsdsdsf opened this issue Nov 4, 2020 · 2 comments

Comments

@erwzqsdsdsf
Copy link

I set a env

export TZ='Asia/Shanghai'

node default log datetime is ok

but winston-mongodb still utc 0.

I set ubuntu sys utc use localtime ,but t winston-mongodb still utc 0.

@yurijmikhalevich
Copy link
Member

@erwzqsdsdsf hi. What do you mean by UTC 0? Do you have incorrect timestamps or do you have correct timestamps saved (before you did anything to switch timestamp) and displayed in UTC 0?

@aPhoneixCat
Copy link

aPhoneixCat commented Sep 20, 2024

Actually, it's related to MongoDB, https://www.mongodb.com/docs/v4.4/tutorial/model-time-data/

MongoDB stores times in UTC by default, and will convert any local time representations into this form. Applications that must operate or report on some unmodified local time value may store the time zone alongside the UTC timestamp, and compute the original local time in their application logic.

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