From cbdffcee6239740665625ae2e4ff8710a8784242 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 29 Jan 2003 09:56:56 +0000 Subject: [PATCH] test_macfs found an error on the first day of its existence: round trips for date values to FSSpec.{Get,Set}Dates didn't work in MacPython-OS9. Fixed. --- Lib/plat-mac/macfs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/plat-mac/macfs.py b/Lib/plat-mac/macfs.py index 56033f319a9..68abc2c09bb 100644 --- a/Lib/plat-mac/macfs.py +++ b/Lib/plat-mac/macfs.py @@ -35,7 +35,11 @@ if time.gmtime(0)[0] == 1970: t = t + 0x10000000L return (0, int(t), 0) else: - def _utc2time(utc): return utc[1] + def _utc2time(utc): + t = utc[1] + if t < 0: + t = t + 0x100000000L + return t def _time2utc(t): if t > 0x7fffffff: t = t - 0x100000000L