[issue29063] Fixed timemodule compile warnings.

STINNER Victor report at bugs.python.org
Tue Jan 3 07:39:04 EST 2017


STINNER Victor added the comment:

Downcasting to int doesn't seem good to me.

gmtoff_time_t.patch uses time_t instead of an int to store gmtoff. It raises an OverflowError if the value doesn't fit into a C long (at least max is at least 2^31).

I guess that the issue only impacts Windows, I expect that most platforms have a tm_zone field in the "tm" structure?

/* Define to 1 if `tm_zone' is a member of `struct tm'. */
#define HAVE_STRUCT_TM_TM_ZONE 1

----------
nosy: +haypo
Added file: http://bugs.python.org/file46122/gmtoff_time_t.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29063>
_______________________________________


More information about the Python-bugs-list mailing list