[python] problem s letnim casem pod windows
Lansky, Milan - Acision
Milan.Lansky na acision.com
Úterý Leden 13 17:16:33 CET 2009
Zdravim,
Mam problem pri nastaveni modify time souboru na hodnotu odpovidajici nejakemu letnimu casu. Cas nastavuju funkci os.utime():
>>> os.utime('2007_11_26\IMG_1944.JPG',(1178445665.0,1178445665.0))
>>> os.path.getmtime('2007_11_26\IMG_1944.JPG')
1178445665.0
>>> time.localtime(1178445665.0)
(2007, 5, 6, 12, 1, 5, 6, 126, 1)
>>> time.ctime(1178445665.0)
'Sun May 06 12:01:05 2007'
Windows (i dosacky dir) zobrazuji u uvedeneho souboru cas 11:01, tedy o hodinu mene:
D:\Projects\python\MediaFiles_tools\2007_11_26>dir
Volume in drive D is Second
Volume Serial Number is 365D-17C7
Directory of D:\Projects\python\MediaFiles_tools\2007_11_26
13.01.2009 15:27 <DIR> .
13.01.2009 15:27 <DIR> ..
06.05.2007 11:01 960 371 IMG_1944.JPG
1 File(s) 960 371 bytes
2 Dir(s) 7 037 947 904 bytes free
Pritom v Linuxu je vse OK a navic klon unixoveho programu ls pro windows taky zobrazuje spravnou hodnotu:
D:\Projects\python\MediaFiles_tools\2007_11_26>ls --full-time
total 940
-rwx------+ 1 lanskym mkpasswd 960371 2007-05-06 12:01:05.000000000 +0200 IMG_19
44.JPG
Milan
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
------------- další část ---------------
HTML příloha byla odstraněna...
URL: <http://www.py.cz/pipermail/python/attachments/20090113/e9012848/attachment.htm>
Další informace o konferenci Python