TinCanPython icon indicating copy to clipboard operation
TinCanPython copied to clipboard

iso8601 bug

Open msterk opened this issue 9 years ago • 0 comments

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

msterk avatar Dec 08 '15 11:12 msterk