Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Logging timestamp as Eastern time

Is there a way to have the log lines preceded with the Eastern timezone? Currently local time.

Tried this since zipline uses it:

import pandas as pd  
import logbook  
logbook.set_datetime_format(lambda: pd.Timestamp.now(tz= 'US/Eastern'))  

16 Error Importing logbook raised an ImportError. No modules or attributes with a similar name were found.

Lines look like this for me at market open, 06:31:
2019-03-22 06:31 trac:360 INFO .

One example of the problem: Two people from different parts of the world wanting to collaborate, pointing to a particular stock being traded at a certain time and the timestamps don't currently match up as reference points.

In eyeing global equity exchanges, also a useful user setting to have in place.
(Quite the visuals in that notebook by Jamie McCorriston posted May 2, 2018).

context.timezone = 'exchange_tz'   # or local or like 'US/Eastern', with default as exchange_tz
3 responses

It's a deeper level, need a way to tell log.info() we want 'US/Eastern'.

Blue,
Yeah...probably not a good answer here, after looking at:
https://www.quantopian.com/posts/changing-default-log-dot-info-standard-message-timezone
which I believe you already knew about.
Perhaps the logbook stuff in Q's IDE is tied up with their restrictions on producing output files, and now changing that would take some work.
alan

You are correct it is not possible.

Hoping Quantopian will decide to offer a setting, clarity when multiple people.