osutils.c problem on windows with python 2.4

Andrei Vermel avermel at mail.ru
Sun Oct 26 10:48:05 CDT 2008


In Python 2.4 os.stat().st_mtime is off by 1 hour for some files - it's a
bug related to daylight saving time.

> With the help of Tony Meyer, we rediscovered the explanation: because
> of a bug in the Microsoft C run-time library, the UTC time reported by
> 2.4 may have been off by one hour (it wasn't local time - just off
> by one hour). This was due to DST issues. They have been fixed in 2.5,
> which now reports the correct UTC value. 

http://groups.google.com/group/comp.lang.python/browse_thread/thread/890eef2
197c6f045/5466283a8253cafb?lnk=gst&q=getmtime&rnum=3&pli=1

This changes with the change of DST, so twice a year hg used to update
dirstate - slow, but bearable since it's only 2 times a year.
Now osutils.c reports correct st_mtime, which is different from the one from
os.stat(), so dirstate keeps updating all the time - very slow.

Andrei 



More information about the Mercurial-devel mailing list