Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iso8601 bug #90

Open
msterk opened this issue Dec 8, 2015 · 0 comments
Open

iso8601 bug #90

msterk opened this issue Dec 8, 2015 · 0 comments

Comments

@msterk
Copy link

msterk commented Dec 8, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant