]> granicus.if.org Git - python/commit
Fix time.mktime() and datetime.datetime.timestamp() on AIX
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 25 Jun 2013 20:54:35 +0000 (22:54 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 25 Jun 2013 20:54:35 +0000 (22:54 +0200)
commit93037498d1f61f31e5b52d2f8d4aa437a26bc14e
treef538d8f9b5dbcba7473bb454c92206c5b9426884
parent5ac1b936ef00841e6c5452d1ef360ab539d31dc2
Fix time.mktime() and datetime.datetime.timestamp() on AIX

On AIX, the C function mktime() alwaysd sets tm_wday, even on error. So tm_wday
cannot be used as a sentinel to detect an error, we can only check if the
result is (time_t)-1.
Modules/_datetimemodule.c
Modules/timemodule.c