How to Change the time zone in Python logging?
How to log the timezone %Z from strftime format Windows >>> import logging >>> logging.basicConfig(format=”%(asctime)s %(message)s”, datefmt=”%m/%d/%Y %I:%M:%S %p %Z”) >>> logging.error(‘test’) 11/03/2017 02:29:54 PM Mountain Daylight Time test Linux >>> import logging >>> logging.basicConfig(format=”%(asctime)s %(message)s”, datefmt=”%m/%d/%Y %I:%M:%S %p %Z”) >>> logging.error(‘test’) 11/03/2017 02:30:50 PM MDT test If the question is How do I log … Read more