I\'m running into an issue with Python 2.7 logging module. My system is Ubuntu 14.04 64bit, and I live in Italy (currently UTC+1, no daylight saving); the system is properly
EDIT:
You can set the time formatter by:
logging.Formatter.converter = time.localtime
to yield local time.
Or:
logging.Formatter.converter = time.gmtime
to get UTC.
As for local time + time zone, first of all, logging.Formatter
uses time, which as you can see here does not really support TZ properly (look at the footnote).
The cleanest alternative would be to write your own formatter that uses datetime
, which apparently has quite the stupid way of using TZ. Basically to make your object "aware", I would go with pytz.