Any idea on how to include it with appengine?

On Mar 5, 3:59 am, Tim Hoffman <zutes...@gmail.com> wrote:
> pytz isn't included with python or gae, you will need to get the
> package from pypi
>
> T
>
> On Mar 5, 10:34 am, andrew <andrew.r...@gmail.com> wrote:
>
> > I was able to convert the datetime timezone from the datastore to EST
> > by following thehttp://timezones.appspot.com/
>
> > for example:
> >                         event.date = event.date.replace(tzinfo=TZINFOS
> > ['utc'])
> >                         event.date = event.date.astimezone(TZINFOS
> > ['est'])
>
> > This works great, however I noticed that EST is hardcoded to UTC-5:
>
> > def utcoffset(self, dt): return datetime.timedelta(hours=-5)
>
> > So when spring rolls around and we are in daylight savings, I'm going
> > to have to update the code to UTC-4, or my time will be off by an
> > hour.
>
> > It seems that pytz would solve this problem but I couldn't figure out
> > how to import it into my application.  I tried
>
> > import pytz
>
> > but got "error <type 'exceptions.ImportError'>: No module named pytz"
>
> > Any suggestions?  Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to