Inside the datastore, DateTimeProperty is stored as UTC... so even if you set a TimeZone before putting.. it will just show up in the datastore as UTC...
See here: http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html <http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html>"If the datetime value has a tzinfo attribute, it will be converted to the UTC time zone for storage. Values come back from the datastore as UTC, with a tzinfo of None. An application that needs date and time values to be in a particular time zone must set tzinfo correctly when updating the value, and convert values to the timezone when accessing the value" I found it sort of annoying at first.. but got over it.. and I just handle timezone conversion before putting and after getting.. On Mon, Dec 14, 2009 at 11:52 AM, Tom Wu <[email protected]> wrote: > Hi All, > > Is anyway to setup the default timezone for db.DateTimeProperty in Python ? > > Global setting like app.yaml or settings.py > > Not inside the script. > > > Best Regards > Tom Wu > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
