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 get correct date? #271

Open
adzcsx2 opened this issue Aug 8, 2018 · 2 comments
Open

how to get correct date? #271

adzcsx2 opened this issue Aug 8, 2018 · 2 comments

Comments

@adzcsx2
Copy link

adzcsx2 commented Aug 8, 2018

my code:
datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
StreamHandler(sys.stdout).push_application()
log = Logger('Logbook')
log.info('Hello, World!')

and the result:

2018-08-09 03:48:25
[2018-08-08 19:48:25.274375] INFO: Logbook: Hello, World!

please tell me how to do it then let the date correct , thanks~

@zxfzqf
Copy link

zxfzqf commented Aug 27, 2018

I have the same problem.Is it a time zone problem?

@wuranxu
Copy link

wuranxu commented Sep 24, 2018

hey, you can use it like this!

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

3 participants