]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34373: Fix time.mktime() on AIX (GH-12726)
authorVictor Stinner <vstinner@redhat.com>
Tue, 9 Apr 2019 17:12:26 +0000 (19:12 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Apr 2019 17:12:26 +0000 (19:12 +0200)
commit8709490f48fc27b3dd1a16acb33bea2299c6a575
tree93776ed6abaae382eb6c3ea2cd369fde769e9841
parent8abc3f4f91e6b523c761c7a6fa2e3405019803a1
bpo-34373: Fix time.mktime() on AIX (GH-12726)

Fix time.mktime() error handling on AIX for year before 1970.

Other changes:

* mktime(): rename variable 'buf' to 'tm'.
* _PyTime_localtime():

  * Use "localtime" rather than "ctime" in the error message
    (specific to AIX).
  * Always initialize errno to 0 just in case if localtime_r()
    doesn't set errno on error.
  * On AIX, avoid abs() which is limited to int type.
  * EINVAL constant is now always available.
Misc/NEWS.d/next/Library/2019-04-08-14-41-22.bpo-34373.lEAl_-.rst [new file with mode: 0644]
Modules/timemodule.c
Python/pytime.c