I'm trying simply to display a GAE timestamp in local (eastern time).
I tried this, but it failed two different ways:
note.create_date_time.replace(tzinfo=pytz.utc).astimezone
(Eastern_tzinfo()).
the display is attempted by invoking note.create_date _time in
a template file
in my dev environment, I import pytz and the code executes, but the
value displayed is still in UTC when I invoke string format methods on
note.create_date_time.
If I deploy the code to GAE, I get a failure trying to import pytz.
What I nee
I appreciate your help. this _really_ should not be hard. Is there a
simple way to get a utc timetamp to on both the client and the
deployed environments?
On Jan 25, 7:24 pm, Alexander Kojevnikov <[email protected]>
wrote:
> > Thanks, but it still doesn't work. How do you convert the gae
> > timestamp? It doesn't understand astimezone.
>
> 'astimezone' is a method of datetime.datetime class. Which type is
> your 'utc_time' variable? Could you post the code where it's
> initialised?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---