Use this to try out time zone handling in the Google App Engine runtime and datastore. See the DateTimeProperty docs for details. You can also download this app's source.
TZ environment variable is set to
UTC, and can't be changed. Timestamps returned by e.g.
will always be in UTC.
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
member isn't set, you'll first need to set it to a UTC
module has a comprehensive set of
tzinfo classes. If your app has
complex time zone needs, consider including it with your app's code. It's
heavyweight, though - over 500 files! - so if you have simpler needs, consider
writing just the few
tzinfo classes you need by hand, following
In the table below, if a datetime has a
-HH:MM suffix, e.g.
+00:00 for UTC, that means it
tzinfo (an explicit time zone) attached. Also, assume
utc is a
tzinfo for the UTC time zone, and assume
Foo class has this definition:
class Foo(db.Model): timestamp = db.DateTimeProperty(auto_now=True)
|Raw timestamp in datastore||1432624645.68|