summaryrefslogtreecommitdiff
path: root/indra/lib/python
diff options
context:
space:
mode:
authorKyle Ambroff <ambroff@lindenlab.com>2008-08-27 22:49:10 +0000
committerKyle Ambroff <ambroff@lindenlab.com>2008-08-27 22:49:10 +0000
commitcff714056a46ac07151efba5f48646213006b566 (patch)
tree80ed6e0ce9b373626b6425bb1e6a0fd8bf5476d3 /indra/lib/python
parent2336b76f0da1a745924d4b9f4a08ff75523e8b0d (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/python')
-rw-r--r--indra/lib/python/indra/base/llsd.py2
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)