Browse Source
bpo-34373: Fix time.mktime() on AIX (GH-12726)
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.
pull/12742/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 39 deletions
-
1Misc/NEWS.d/next/Library/2019-04-08-14-41-22.bpo-34373.lEAl_-.rst
-
66Modules/timemodule.c
-
17Python/pytime.c
@ -0,0 +1 @@ |
|||
Fix :func:`time.mktime` error handling on AIX for year before 1970. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue