[Pythonmac-SIG] os.path.getmtime bug?
Erik van Blokland
erik@letterror.com
Sat, 4 Mar 2000 22:00:06 +0100
-- Erik van Blokland [3/4/00 9:51 PM]:
from macpath and my previous post:
>>def getmtime(filename):
>> """Return the last modification time of a file, reported by os.stat()."""
>> st = os.stat(filename)
>> return st[stat.ST_MTIME]
>>def getatime(filename):
>> """Return the last access time of a file, reported by os.stat()."""
>> st = os.stat(filename)
>> return st[stat.ST_MTIME]
looking at it more closely, both getatime() and getmtime() return
st[stat.ST_MTIME], can't be right either. No?
And when I fix the import problem macpath, the number returned by
getmtime() still seems to be in a different epoch when compared to
time.time(). As macpath is a mac specific module already we could do some
math on it and get it to be the same epoch as time.time() is in?
Erik
-- letterror