circus-tent / circus

A Process & Socket Manager built with zmq
http://circus.readthedocs.org/
Other
1.55k stars 258 forks source link

Logging date/time is timezone unaware (naive) #942

Open aswen opened 8 years ago

aswen commented 8 years ago

https://github.com/circus-tent/circus/blob/610195a247e32f2466614aabdc85908685c00bae/docs/source/for-ops/configuration.rst#watchedfilestream suggests one can use strtime() compattible datetime prefix in the logstream. However, when I use %FT%T%z the %z will be empty. The Python documentation says %z is "UTC offset in the form +HHMM or -HHMM (empty string if the the object is naive)". (https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior) So, it apears to me that the date/time object used is "naive". In my opinion a log should have "timezone-aware" prefixes so I wonder if it's feasible to make that object more "wise"...

k4nar commented 8 years ago

I believe we could fix that, yes. I think we'll need to add pytz to the requirements though.