Re: problem with strptime and time zone

2010-08-25 Thread Alex Willmer
On Aug 25, 8:48 am, Lawrence D'Oliveiro wrote: > In message > <45faa241-620e-42c7-b524-949936f63...@f6g2000yqa.googlegroups.com>, Alex > > Willmer wrote: > > Dateutil has it's own timezone database ... > > I hate code which doesn’t just use /usr/share/zoneinfo. How many places do > you need to pat

Re: problem with strptime and time zone

2010-08-25 Thread Lawrence D'Oliveiro
In message <45faa241-620e-42c7-b524-949936f63...@f6g2000yqa.googlegroups.com>, Alex Willmer wrote: > Dateutil has it's own timezone database ... I hate code which doesn’t just use /usr/share/zoneinfo. How many places do you need to patch every time somebody changes their daylight-saving rules?

Re: problem with strptime and time zone

2010-08-24 Thread m_ahlenius
On Aug 24, 4:16 pm, Alex Willmer wrote: > On Aug 24, 9:45 pm, m_ahlenius wrote: > > > > > whereas this fails: > > myStrA = 'Sun Aug 22 19:03:06 PDT' > > gTimeA = strptime( myStrA, '%a %b %d %H:%M:%S %Z') > > print "gTimeA = ",gTimeA > > > ValueError: time data 'Sun Aug 22 19:03:06 PDT' does not m

Re: problem with strptime and time zone

2010-08-24 Thread Chris Rebert
On Tue, Aug 24, 2010 at 1:45 PM, m_ahlenius wrote: > Hi, > > perhaps I missed this posted already somewhere. > > I am got a program which reads time stings from some devices which > are  providing the time zones.  I have to take this into account when > doing some epoch time calculations. > > When

Re: problem with strptime and time zone

2010-08-24 Thread Alex Willmer
On Aug 24, 9:45 pm, m_ahlenius wrote: > > whereas this fails: > myStrA = 'Sun Aug 22 19:03:06 PDT' > gTimeA = strptime( myStrA, '%a %b %d %H:%M:%S %Z') > print "gTimeA = ",gTimeA > > ValueError: time data 'Sun Aug 22 19:03:06 PDT' does not match format > '%a %b %d %H:%M:%S %Z' Support for the %Z

problem with strptime and time zone

2010-08-24 Thread m_ahlenius
Hi, perhaps I missed this posted already somewhere. I am got a program which reads time stings from some devices which are providing the time zones. I have to take this into account when doing some epoch time calculations. When I run the following code with the time zone string set to 'GMT' it