fmt = '%Y-%m-%d %H:%M:%S'
now_utc = datetime.now(timezone('UTC'))
print(now_utc.strftime(fmt))
now_pacific = now_utc.astimezone(timezone('US/Pacific'))
print(now_pacific.strftime(fmt))
now_berlin = now_pacific.astimezone(timezone('Europe/Berlin'))
print(now_berlin.strftime(fmt))
How to get user's local timezone other than server timezone(UTC) in python?