Use the tzlocal function from the python-dateutil package: from dateutil.tz import tzlocal localtimezone ...
stackoverflow.com