summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-03-20 03:26:49 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-03-20 03:26:49 (GMT)
commit26ae7cd75a0e33b98a5156e1d4501be66e39a79f (patch)
treedc0146b739cc1b78aa43758eb7f5dbed580b051a /Modules/timemodule.c
parentce7ef599d2df7c43f8228f22a77de4554039dc0f (diff)
downloadcpython-26ae7cd75a0e33b98a5156e1d4501be66e39a79f.zip
cpython-26ae7cd75a0e33b98a5156e1d4501be66e39a79f.tar.gz
cpython-26ae7cd75a0e33b98a5156e1d4501be66e39a79f.tar.bz2
SF patch 407758, "timemodule patches for Cygwin", from Norman Vine.
http://sourceforge.net/tracker/?func=detail&aid=407758&group_id=5470&atid=305470
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 90886f2..cfce06b 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -664,6 +664,13 @@ inittime(void)
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__ */
}