You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
someone copied your conversion from datetime.timedelta to iso8601 to Stack Overflow, and I spotted a bug in it. If you add these two tests they will fail:
iso = jsonify_timedelta(timedelta(seconds=10))
self.assertEqual(iso, 'PT10S') #will return PT1S
iso = jsonify_timedelta(timedelta(seconds=60))
self.assertEqual(iso, 'PT01M') #will return PT1MS
The text was updated successfully, but these errors were encountered:
Hi,
someone copied your conversion from datetime.timedelta to iso8601 to Stack Overflow, and I spotted a bug in it. If you add these two tests they will fail:
iso = jsonify_timedelta(timedelta(seconds=10))
self.assertEqual(iso, 'PT10S') #will return PT1S
iso = jsonify_timedelta(timedelta(seconds=60))
self.assertEqual(iso, 'PT01M') #will return PT1MS
The text was updated successfully, but these errors were encountered: