datetime to local time python code example Example: python local date time import pytz datetime.datetime.now(pytz.timezone('Europe/Rome'))