B
Brian
I'm running App Engine with Django. I'm having troubles executing
timezone conversion via pytz. I have looked at the Google example
implementation. The following works in IDLE:
2009-03-22 11:02:41.578000
2009-03-22 06:02:41.578000-05:00
I have tried to run the following in my app (modules imported, too):
def tz(request):
timestamp = datetime.datetime.utcnow()
translated = timestamp.replace(tzinfo=pytz.utc).astimezone
(timezone
('US/Central'))
return respond(request, user, 'tz',
{'translated':translated,'timestamp':timestamp})
When I pull up the page, I get the following error:
UnknownTimeZoneError at /tz
'US/Central'
Request Method: GET
Request URL: http://localhost:8080/tz
Exception Type: UnknownTimeZoneError
Exception Value: 'US/Central'
Does this not work in App Engine for some reason?
timezone conversion via pytz. I have looked at the Google example
implementation. The following works in IDLE:
2009-03-22 11:02:41.578000
2009-03-22 06:02:41.578000-05:00
I have tried to run the following in my app (modules imported, too):
def tz(request):
timestamp = datetime.datetime.utcnow()
translated = timestamp.replace(tzinfo=pytz.utc).astimezone
(timezone
('US/Central'))
return respond(request, user, 'tz',
{'translated':translated,'timestamp':timestamp})
When I pull up the page, I get the following error:
UnknownTimeZoneError at /tz
'US/Central'
Request Method: GET
Request URL: http://localhost:8080/tz
Exception Type: UnknownTimeZoneError
Exception Value: 'US/Central'
Does this not work in App Engine for some reason?