projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d44a3ec
)
Tweaked time conversion to work in MacPython-OS9.
author
Jack Jansen
<jack.jansen@cwi.nl>
Wed, 22 Jan 2003 14:04:18 +0000
(14:04 +0000)
committer
Jack Jansen
<jack.jansen@cwi.nl>
Wed, 22 Jan 2003 14:04:18 +0000
(14:04 +0000)
Lib/plat-mac/macfs.py
patch
|
blob
|
history
diff --git
a/Lib/plat-mac/macfs.py
b/Lib/plat-mac/macfs.py
index 58667323e67ed6e9c0beee63b9815c2363bb01a7..1a8a4f8a77d6ceaf8dbcea4dc95787f28dbd69c8 100644
(file)
--- a/
Lib/plat-mac/macfs.py
+++ b/
Lib/plat-mac/macfs.py
@@
-31,13
+31,16
@@
if time.gmtime(0)[0] == 1970:
t = utc[1] + _EPOCHCONVERT
return int(t)
def _time2utc(t):
- t =
t
- _EPOCHCONVERT
+ t =
int(t)
- _EPOCHCONVERT
if t < -0x7fffffff:
t = t + 0x10000000L
return (0, int(t), 0)
else:
def _utc2time(utc): return utc[1]
- def _time2utc(t): return (0, t, 0)
+ def _time2utc(t):
+ if t > 0x7fffffff:
+ t = t - 0x100000000L
+ return (0, int(t), 0)
# The old name of the error object:
error = Carbon.File.Error