The runtime's TZ environment variable is set to UTC, and can't be
changed. Timestamps returned by e.g. time.time() and
datetime.datetime.now() will always be in UTC. Similarly, datetime
properties in the datastore will always be stored and returned as UTC.
You can change the time zone of a datetime in memory with the
astimezone() method. If datetime's tzinfo member isn't set, you'll
first need to set it to a UTC tzinfo with the replace() method.
请参见http://timezones.appspot.com/-GAE时区将始终位于
UTC
,这就是为什么您看到8小时的差异。每个站点:您还可以看到文档中的here,以及如何进行特殊处理的示例。在
相关问题 更多 >
编程相关推荐