]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
All mac compilers now use 1904 as the Epoch...
authorGuido van Rossum <guido@python.org>
Sat, 27 Jul 1991 23:09:30 +0000 (23:09 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 27 Jul 1991 23:09:30 +0000 (23:09 +0000)
Modules/timemodule.c

index 0b8faf2edbe6939b177278858db9da380cb8603f..a3bd383ee48d7567f1ed47471974a7db1cadd0a5 100644 (file)
@@ -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);
 }