Closed troygrosfield closed 10 years ago
I've tested this changes locally as well and everything's working as expected after this fix.
Any updates on this?
The implementation looks fairly complicated (multiple len
, a strip, math). Any reason not to just do int(time_groups[key].ljust(6, '0'))
?
If that works, perhaps we can refactor to only have theint()
call once, something like:
value = time_groups[key]
if key == 'microseconds':
value = value.ljust(6, '0')
time_groups[key] = int(value)
If you also would not mind, it would be nice to add a simple comment explaining why the padding occurs (e.g. to represent as a microsecond, since not all digits are required)
Done. Also, would recommend bumping travis ci to build against the last django version (1.6.0 -> 1.6.2)
Fixes #12.