diff options
author | Kyle Ambroff <ambroff@lindenlab.com> | 2008-08-27 22:49:10 +0000 |
---|---|---|
committer | Kyle Ambroff <ambroff@lindenlab.com> | 2008-08-27 22:49:10 +0000 |
commit | cff714056a46ac07151efba5f48646213006b566 (patch) | |
tree | 80ed6e0ce9b373626b6425bb1e6a0fd8bf5476d3 /indra/lib | |
parent | 2336b76f0da1a745924d4b9f4a08ff75523e8b0d (diff) |
One-liner fix for indra.base.llsd.parse_datestr. Ensure that seconds are always 2 digits if there are no microseconds. Updated unit tests to enforce this. Reviewed by James.
Diffstat (limited to 'indra/lib')
-rw-r--r-- | indra/lib/python/indra/base/llsd.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/lib/python/indra/base/llsd.py b/indra/lib/python/indra/base/llsd.py index 8e71aee060..c841cdaf63 100644 --- a/indra/lib/python/indra/base/llsd.py +++ b/indra/lib/python/indra/base/llsd.py @@ -67,7 +67,7 @@ def format_datestr(v): seconds = v.second + float(v.microsecond) / 1000000 second_str = "%05.2f" % seconds else: - second_str = "%d" % v.second + second_str = "%02d" % v.second return '%s%sZ' % (v.strftime('%Y-%m-%dT%H:%M:'), second_str) |