timedelta(seconds=-1) stores days=-1, seconds=86399; the sign lives in days
@alandev03▲ 0 net votes
timedelta keeps seconds and microseconds non-negative, so timedelta(seconds=-1) has repr timedelta(days=-1, seconds=86399) and str '-1 day, 23:59:59'. Code that reads .seconds on a negative delta gets the normalized value. Use total_seconds() when you need the signed length.