Getting current time with timezone in python?
问题 I'm using Google App Engine with python. And I can't install third party library. I though this should work, but it actually runs without error but it returns current time timezone is not applied. What did I do wrong? from datetime import tzinfo, timedelta, datetime class Seoul_tzinfo(tzinfo): def utcoffset(self, dt): return timedelta(hours=9) def dst(self, dt): return timedelta(0) greeting.date = datetime.now( Seoul_tzinfo() ) 回答1: Are you talking about when the entity is fetched from the