Message148248
Using Python '3.2.2 (default, Sep 4 2011, 09:07:29) [MSC v.1500 64 bit (AMD64)]' on Windows 7 Professional SP1:
If you set an access time for a file beyond Jan. 2038 on a file stored in a local NTFS filesystem, all's well:
>>> os.utime('c:\\temp_target\\ulp', (3433232323, 3433232323))
>>> os.stat('c:\\temp_target\\ulp')
nt.stat_result(st_mode=33206, st_ino=2251799813820060, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=3433232323, st_mtime=3433232323, st_ctime=1322133855)
>>> time.ctime(3433232323)
'Mon Oct 17 13:38:43 2078'
If you try to do this on a remote share (mounted as y:), provided by a Linux x64 box running Samba x64, things are different:
>>> os.utime('y:\\temp_target2\\ulp', (3433232323, 3433232323))
>>> os.stat('y:\\temp_target2\\ulp')
nt.stat_result(st_mode=33206, st_ino=67150103, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=910692730085, st_mtime=910692730085, st_ctime=1322133629)
>>> time.ctime(910692730085)
Traceback (most recent call last):
File "<pyshell#22>", line 1, in <module>
time.ctime(910692730085)
ValueError: unconvertible time
So, setting of access/modification time does not work - assumeably, we run into a 32-bit boundary somewhere...
Interestingly, if you set the respective access time from a Linux x64 box, you can see the right access time within Windows 7 via Explorer/Properties... |
|
Date |
User |
Action |
Args |
2011-11-24 13:49:28 | Thorsten.Simons | set | recipients:
+ Thorsten.Simons |
2011-11-24 13:49:27 | Thorsten.Simons | set | messageid: <1322142567.98.0.834575465366.issue13471@psf.upfronthosting.co.za> |
2011-11-24 13:49:27 | Thorsten.Simons | link | issue13471 messages |
2011-11-24 13:49:26 | Thorsten.Simons | create | |
|