diff Modules/timemodule.c @ 17079:bc0555be2212 legacy-trunk

SF patch 407758, "timemodule patches for Cygwin", from Norman Vine. http://sourceforge.net/tracker/?func=detail&aid=407758&group_id=5470&atid=305470
author Tim Peters <tim.peters@gmail.com>
date Tue, 20 Mar 2001 03:26:49 +0000
parents 86fd723f2928
children beb9d2b02846
line wrap: on
line diff
--- a/Modules/timemodule.c	Tue Mar 20 00:25:43 2001 +0000
+++ b/Modules/timemodule.c	Tue Mar 20 03:26:49 2001 +0000
@@ -664,6 +664,13 @@
 	ins(d, "tzname", Py_BuildValue("(zz)", "", ""));
 #endif /* macintosh */
 #endif /* HAVE_TM_ZONE */
+#ifdef __CYGWIN__
+	tzset();
+	ins(d, "timezone", PyInt_FromLong(_timezone));
+	ins(d, "altzone", PyInt_FromLong(_timezone));
+	ins(d, "daylight", PyInt_FromLong(_daylight));
+	ins(d, "tzname", Py_BuildValue("(zz)", _tzname[0], _tzname[1]));
+#endif /* __CYGWIN__ */
 #endif /* !HAVE_TZNAME || __GLIBC__ */
 }