Daylight savings time problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fabio Durieux Lopes

    #1

    Daylight savings time problem

    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_200803261 70558).
    So I do this:
    fileTimeInSecs = time.mktime(tim e.strptime(time String,
    "%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?

Working...