[google-appengine] Re: get IST time?

2009-11-14 Thread deostroll
How should I determine the timedelta offset..is it based on GMT...? On Nov 14, 10:45 pm, Simo Salminen wrote: > Forget the method first_sunday: > def first_sunday(d): >     while 1: >         if d.weekday() == 6: # sunday >             return d >         d -= datetime.timedelta(days=1) > > On Nov

[google-appengine] Re: get IST time?

2009-11-14 Thread Simo Salminen
Forget the method first_sunday: def first_sunday(d): while 1: if d.weekday() == 6: # sunday return d d -= datetime.timedelta(days=1) On Nov 14, 7:41 pm, Simo Salminen wrote: > Not really related to this, but I had following problem: how to > convert local finnish

[google-appengine] Re: get IST time?

2009-11-14 Thread Simo Salminen
Not really related to this, but I had following problem: how to convert local finnish time zone to utc. I could not really find solution to this. Using python time library does not work because time.tzset does not work on app engine. In the end I decided to build solution by hand, only working for