Is it possible with Python to set the timezone just like this in PHP:
date_default_timezone_set(\"Europe/London\"); $Year = date(\'y\'); $Month = date(\'m\')
You can use pytz as well..
import datetime import pytz def utcnow(): return datetime.datetime.now(tz=pytz.utc) utcnow() datetime.datetime(2020, 8, 15, 14, 45, 19, 182703, tzinfo=) utcnow().isoformat() '
2020-08-15T14:45:21.982600+00:00'