print(duration_string(datetime.timedelta(seconds=-5)))
}}}
This should print `-00:00:05` but instead it prints `-1 23:59:55` which is
interpreted as -1 day, plus 23 hours, plus 59 minutes, plus 55 seconds.
I don't think it's intuitive to support durations that have different
signs on the number of days vs hours/minutes/seconds. Note that ISO8601
timestamps just have one sign that applies to all components.
--
Ticket URL: <https://code.djangoproject.com/ticket/30443>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Ryan Govostes):
https://github.com/django/django/pull/11321
--
Ticket URL: <https://code.djangoproject.com/ticket/30443#comment:1>
* status: new => assigned
* owner: nobody => udbhavgovil
--
Ticket URL: <https://code.djangoproject.com/ticket/30443#comment:2>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/30443#comment:3>
* status: assigned => new
* owner: udbhavgovil => (none)
--
Ticket URL: <https://code.djangoproject.com/ticket/30443#comment:4>
Comment (by udbhavgovil):
https://github.com/django/django/pull/11326
--
Ticket URL: <https://code.djangoproject.com/ticket/30443#comment:5>
* status: new => closed
* version: 2.2 => master
* easy: 1 => 0
* ui_ux: 1 => 0
* resolution: => duplicate
Comment:
Duplicate of #26317.
--
Ticket URL: <https://code.djangoproject.com/ticket/30443#comment:6>