Prabakaran Kumaresshan <k_prabaka...@hotmail.com> added the comment:
It's a side effect of a date arithmetic operation performed while setting timezone. while passing tz info to datetime invokes tz.fromutc() -> https://github.com/python/cpython/blob/3df85404d4bf420db3362eeae1345f2cad948a71/Lib/datetime.py#L1593 followed by a datetime arithmetic here -> https://github.com/python/cpython/blob/3df85404d4bf420db3362eeae1345f2cad948a71/Lib/datetime.py#L2188 which eventually leads to building a new datetime object here -> https://github.com/python/cpython/blob/3df85404d4bf420db3362eeae1345f2cad948a71/Lib/datetime.py#L1997-L2000 I'm not sure if its an expected behaviour ---------- nosy: +nixphix _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35364> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com