The total_seconds of timedelta min and max can not be used to instanciate a timedelta. So we need to test for such case and return timedelta min or max.
The total_seconds of timedelta min and max can not be used to instanciate a timedelta. So we need to test for such case and return timedelta min or max.