Daylight savings time problem

  • Thread starter Fabio Durieux Lopes
  • Start date
F

Fabio Durieux Lopes

Hi,

I'm trying to execute some operations based on a file's time. The
file's time is actually the file's name (e.g. FILE1_20080326170558).
So I do this:
fileTimeInSecs = time.mktime(time.strptime(timeString,
"%Y%m%d%H%M"))

timeString contains the date part of the file's name. Function
strptime returns a time_struct, but my problem is that tm_isdst is
set to 0, and when we enter daylight savings time the file's time is
off by 1 hour. This time_struct is also read only so I can't change
tm_isdst to -1.

Anyone knows how to fix it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top