[Pythonmac-SIG] Anybody have a fix for time in 1.5.2c?
Russell E Owen
owen@astro.washington.edu
Tue, 21 Nov 2000 09:57:09 -0800
I'm just starting to try to read file creation times and things
aren't working as expected.
For a file created Jul 5, 2000:
>>> ap = "RussMain:Desktop Folder:test"
>>> ct = os.stat(ap)[stat.ST_CTIME]
>>> ct
3045641098.0
>>> time.localtime(ct)
(1996, 7, 6, 11, 24, 58, 5, 188, -1)
>>> time.gmtime(ct)
(1996, 7, 6, 19, 24, 58, 5, 188, -1)
I looked back and found a discussion that was probably about this
same problem, but no solution. Any suggested patches?
I am still using 1.5.2 because Tk is broken in 2.0 (file events don't work).
-- Russell
P.S. for anybody else using 1.5.2c, here's another fix:
in macpath.py remove all three instances of "stat." or explicitly
include stat in addition to the existing import stat *.