Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26ae7cd

Browse files
committed
SF patch 407758, "timemodule patches for Cygwin", from Norman Vine.
http://sourceforge.net/tracker/?func=detail&aid=407758&group_id=5470&atid=305470
1 parent ce7ef59 commit 26ae7cd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Modules/timemodule.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,13 @@ inittime(void)
664664
ins(d, "tzname", Py_BuildValue("(zz)", "", ""));
665665
#endif /* macintosh */
666666
#endif /* HAVE_TM_ZONE */
667+
#ifdef __CYGWIN__
668+
tzset();
669+
ins(d, "timezone", PyInt_FromLong(_timezone));
670+
ins(d, "altzone", PyInt_FromLong(_timezone));
671+
ins(d, "daylight", PyInt_FromLong(_daylight));
672+
ins(d, "tzname", Py_BuildValue("(zz)", _tzname[0], _tzname[1]));
673+
#endif /* __CYGWIN__ */
667674
#endif /* !HAVE_TZNAME || __GLIBC__ */
668675
}
669676

0 commit comments

Comments
 (0)