local_time.py 184 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 from datetime import datetime from pytz import timezone import os TZ = timezone(os.environ['TZ'] if 'TZ' in os.environ else 'Europe/Kiev') def get_now(): return datetime.now(TZ)