[python-win32] File Time: win32file vs Python ?

Robert kxroberto at googlemail.com
Fri Jul 3 13:01:54 CEST 2009


time.time() / getmtime() is absolute / UTC. and win32file says: 
compatible with time.time. a int value doesn't make sense as 
localtime?
It even picks up daylight saving, so the int file times would 
change in winter

 >>> time.timezone
-3600
 >>> time.altzone
-7200


R


Paul Koning wrote:
> Maybe one is defined to return local time while the other returns the
> time value as UTC?  I don't have the docs, but they should tell...
> 
> 	paul
> 
>> -----Original Message-----
>> From: python-win32-bounces+pkoning=equallogic.com at python.org
>> [mailto:python-win32-bounces+pkoning=equallogic.com at python.org] On
>> Behalf Of Robert
>> Sent: Thursday, July 02, 2009 5:07 PM
>> To: python-win32 at python.org
>> Subject: [python-win32] File Time: win32file vs Python ?
>>
>>
>>  >>> 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?
>>
>> R
>>
>> _______________________________________________
>> python-win32 mailing list
>> python-win32 at python.org
>> http://mail.python.org/mailman/listinfo/python-win32



More information about the python-win32 mailing list