python - DateTimeProperty time-zone -


using gea , trying set time-zone datetimeproperty below. set timezone in model class , not when creating entry.

class person(ndb.model):     date_created = ndb.datetimeproperty(auto_now_add=true)  

you not setting timezone, setting datetime, when create entity. timezone should stored seperately. appengine datetime functionality works utc.

you should convert utc when performing queries, , timezone want when displaying content.


Comments

Popular posts from this blog

git - Initial Commit: "fatal: could not create leading directories of ..." -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -