By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,630 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,630 IT Pros & Developers. It's quick & easy.

Daylight savings time problem

P: n/a
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?

Mar 26 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.