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

Log文件的时间戳是UTC0时区 #3

Open
aiyacharley opened this issue Mar 10, 2022 · 1 comment
Open

Log文件的时间戳是UTC0时区 #3

aiyacharley opened this issue Mar 10, 2022 · 1 comment

Comments

@aiyacharley
Copy link
Collaborator

Log文件的时间戳是UTC0时区,需要修改logger设置date为本地机器的时间date=record.time

@aiyacharley
Copy link
Collaborator Author

在log/init.py文件中增加下面两行,就可以设置时间戳为本地时间:
import logbook
logbook.set_datetime_format("local")

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

1 participant