from datetime import datetime, timezone from dateutil import tz tz_local = tz.gettz('America/Chicago') date_now = datetime.now(timezone.utc) print(' UTC:', date_now) print('Local:', date_now.astimezone(tz_local))
UTC: 2021-04-07 19:56:56.466314+00:00 Local: 2021-04-07 14:56:56.466314-05:00