Python 2.5.1 broken os.stat module

"Martin v. Löwis" martin at v.loewis.de
Sun Jun 3 13:25:32 EDT 2007


> It appears that you may have missed part of my tests.  Sorry it was such a 
> long reply but I was trying to provide a lot of detail so that others had a 
> clear understanding of what was going on.

Please understand that it is *extremely* tedious to follow your
messages. It would have been much better if they had been short and
to the point.

> Changing the timezone will defintely change the "textual representation" of 
> all timestamps just as you say (even though the actual UTC value has *not* 
> changed), however, when DST starts/ends the "textual representation" of the 
> timestamps on some files WILL ALSO CHANGE when the automatically adjust for 
> DST setting is turned on.

Right, and that's because switching to DST means that YOU MOVE TO A
DIFFERENT TIME ZONE.

EST != EDT.

> While it is true that I did change the timezone in the first part of the 
> test (to establish the baseline), in the second part of the tests where the 
> difference you are referring to occured, the timezone was *not* changed, the 
> only thng that occured was that DST started.

And that meant that the time zone *did* change.

> When the date progressed to a point after DST had started Windows now 
> reports the timestamp on that *unmodified* file now is 01/01/2007 08:00 PM.
> 
> I did not change the timezone, the only thing that occurred was DST started.

So you did change the timezone.

> Over the years this issue has caused all sorts of problems for backup 
> programs and CVS (greatly detailed in the article I provided the link for).

That is very hard to believe. CVS and backup programs use the UTC time
stamp, and completely ignore the timezone. So when you agree that the
UTC time stamp did not change, CVS and the backup programs will work
just fine.

There was a long-standing problem with changing time-stamps ON FAT.
On a FAT file system, the actual UTC time stamps change when the
timezone changes (including the change to and from DST). *That*
was a big problem for backup programs and CVS, and is now fixed
with NTFS.

> You mixed up my tests, in that case as shown above the timezone did *not* 
> change, the only thing that changed was that DST started and the file was 
> created during a time when DST was not in effect.

Right, so the timezone did change.

Regards,
Martin



More information about the Python-list mailing list