Robert wrote:
> >>> os.path.getmtime('x.txt')
> 1193160881
> >>> int(win32file.GetFileAttributesExW('x.txt')[-2])
> 1193153681
> >>> int(win32file.GetFileAttributesExW('x.txt')[-2]) -
> os.path.getmtime('x.txt')
> -7200
>
> (Win XP)
> is this a bug, or is there a issue with timezones/summer time? aren't
> time.time() values absolute?

The meaning of time.time isn't really relevant to this. 
GetFileAttributesExW returns values directly from the file system, and
NTFS happens to store its timestamps in UTC.  os.path.getmtime adjusts
to local time.

FAT file systems record timestamps in local time, which causes the
reported times to change during summer time.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to