Set timezone to EST in Google App Engine (Python)
Can anyone advise how I change the timezone for my google app engine application? It's running python, I need to 开发者_如何学运维set the timezone so all datetime.now() etc work on EST timezone instead of the default?
Thanks!
Have a look at http://timezones.appspot.com/
You can not make datetime.now()
to use your custom time zone but you can convert time as per your requirements.
You can also use the dateutil library:
datetime.datetime.now(dateutil.tz.tzutc())
...to get the now() time for UTC, for instance.
精彩评论