I came across a strange behavior of the datetime module of Python3: I calculate the difference between the dates "date" and "mon", and then add to the "date" first the resulting difference as it is, and then add to the "date" the resulting difference converted into seconds. But for some reason, the dates are different, although they should be the same. Please tell me what I'm doing wrong.
date=datetime.datetime(2021,9,4,13,00)
mon=datetime.datetime(2021, 9, 6, 0, 0)
delta=mon-date
print(date+delta)
print(date+datetime.timedelta(seconds=(delta).seconds))
result:
2021-09-06 00:00:00
2021-09-05 00:00:00