mirror of
https://github.com/python/cpython.git
synced 2025-09-24 17:33:29 +00:00
Closes issue #23600: Wrong results from tzinfo.fromutc().
This commit is contained in:
commit
c58c2cb392
3 changed files with 27 additions and 1 deletions
|
@ -3046,7 +3046,7 @@ tzinfo_fromutc(PyDateTime_TZInfo *self, PyObject *dt)
|
|||
goto Fail;
|
||||
if (dst == Py_None)
|
||||
goto Inconsistent;
|
||||
if (delta_bool(delta) != 0) {
|
||||
if (delta_bool((PyDateTime_Delta *)dst) != 0) {
|
||||
PyObject *temp = result;
|
||||
result = add_datetime_timedelta((PyDateTime_DateTime *)result,
|
||||
(PyDateTime_Delta *)dst, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue