diff options
author | Guido van Rossum <guido@python.org> | 1991-07-27 23:09:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-07-27 23:09:30 (GMT) |
commit | 00c567ce6f7c796a11ca3db36b22b6dbd24797cc (patch) | |
tree | 2f4c990401ac8f40ebf7a4ba78f798fcd350006e /Modules | |
parent | 8c11a5c759a26137de3a84086641d0ee751ffe5b (diff) | |
download | cpython-00c567ce6f7c796a11ca3db36b22b6dbd24797cc.zip cpython-00c567ce6f7c796a11ca3db36b22b6dbd24797cc.tar.gz cpython-00c567ce6f7c796a11ca3db36b22b6dbd24797cc.tar.bz2 |
All mac compilers now use 1904 as the Epoch...
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/timemodule.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 0b8faf2..a3bd383 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -69,15 +69,13 @@ time_time(self, args) if (!getnoarg(args)) return NULL; time(&secs); -#ifdef applec /* MPW */ -/* Difference in origin between Mac and Unix clocks: */ -/* For THINK C 3.0 add a correction like 5*3600; - it converts to UCT from local assuming EST */ +#ifdef macintosh +/* The Mac epoch is 1904, while UNIX uses 1970; Python prefers 1970 */ +/* Moreover, the Mac returns local time. This we cannot fix... */ #define TIMEDIFF ((time_t) \ (((1970-1904)*365L + (1970-1904)/4) * 24 * 3600)) secs -= TIMEDIFF; -/* XXX It's almost better to directly fetch the Mac clock... */ -#endif /* applec */ +#endif return newintobject((long)secs); } |