summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2009-12-07 18:11:26 +0000
committerjortel <devnull@localhost>2009-12-07 18:11:26 +0000
commita2db123fd39b0367331ddbc3c44d605a50c8ded8 (patch)
treee8ec6321f17ee469d0fd87187c3c27b5ea6cd7cf
parente660374a393d7ea0d6b8eaa31196333902245bf4 (diff)
downloadsuds-a2db123fd39b0367331ddbc3c44d605a50c8ded8.tar.gz
Trim microsecond to 6 digits when bigger to comply with python datetime.datetime restriction that microseconds must be between 0..999999 and to protect against number larger then an integer.
-rw-r--r--suds/__init__.py2
-rw-r--r--suds/sax/date.py8
2 files changed, 3 insertions, 7 deletions
diff --git a/suds/__init__.py b/suds/__init__.py
index 772a563..8f8f48d 100644
--- a/suds/__init__.py
+++ b/suds/__init__.py
@@ -29,7 +29,7 @@ import sys
#
__version__ = '0.3.8'
-__build__="(beta) R619-20091207"
+__build__="(beta) R620-20091207"
#
# Exceptions
diff --git a/suds/sax/date.py b/suds/sax/date.py
index 67bce5e..7f66429 100644
--- a/suds/sax/date.py
+++ b/suds/sax/date.py
@@ -230,13 +230,9 @@ class Time:
"""
part = s.split('.')
if len(part) > 1:
- second = int(part[0])
- ms = int(part[1])
- if ms > 999999: ms = 999999
+ return (int(part[0]), int(part[1][:6]))
else:
- second = int(part[0])
- ms = None
- return (second, ms)
+ return (int(part[0]), None)
def __offset(self, s):
"""