os.path.getmtime on winXP

Jorg Rødsjø jorg at neoplex.org
Tue Nov 8 01:57:44 EST 2005


[sorry to those reading twice, but I just realised that I had posted 
this after mucking about with the date on my machine to try to figure 
this out -- so the message probably went into last months messages for 
most people including me.]

Hi

I'm trying to use os.path.getmtime to check if a file has been modified. 
  My OS is WinXP. The problem is, that when the os changes from/to 
daylight savings time, the result is suddenly off by 3600 seconds ie. 
one hour, even if the file remains the same.

I've tried using win32file.GetFileTime, and it reports a consistent 
number, regardless of DST.

What is happening here? My first thought is that getmtime should measure 
'raw' time, and not be concerned with DST, and thus give me the same 
result no matter the date on the machine I call it. Is the module broken 
in some way, or am I just missing something here?

regards
Jorg Rødsjø



More information about the Python-list mailing list