The standard logging package in Python 2.7 does not support timezone. # In a system whose timezone is set to America/Chicago import logging logging.basicConfig(format ...
def poll(self): if self.timezone: now = datetime.now(timezone.utc).astimezone(self.timezone) else: now = datetime.now(timezone.utc).astimezone() return (now + self ...