aboutsummaryrefslogtreecommitdiff
path: root/pyasn1
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2018-05-23 22:26:54 +0200
committerIlya Etingof <etingof@gmail.com>2018-05-23 22:31:10 +0200
commit2cfdcffb666c1b8756aa4d345ef4cac608286c45 (patch)
tree75c9e57fee76114f7b419f79ea564928a0a17c10 /pyasn1
parent844285b0021e00e341db3a31d3cb58a98d192d65 (diff)
downloadpyasn1-2cfdcffb666c1b8756aa4d345ef4cac608286c45.tar.gz
fix GenerlizedTime.asDateTime() operation
Diffstat (limited to 'pyasn1')
-rw-r--r--pyasn1/type/useful.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyasn1/type/useful.py b/pyasn1/type/useful.py
index 145713f..146916d 100644
--- a/pyasn1/type/useful.py
+++ b/pyasn1/type/useful.py
@@ -104,7 +104,7 @@ class TimeMixIn(object):
text, _, ms = string.partition(text, ',')
try:
- ms = int(ms) * 10000
+ ms = int(ms) * 1000
except ValueError:
raise error.PyAsn1Error('bad sub-second time specification %s' % self)
@@ -142,7 +142,7 @@ class TimeMixIn(object):
"""
text = dt.strftime(cls._yearsDigits == 4 and '%Y%m%d%H%M%S' or '%y%m%d%H%M%S')
if cls._hasSubsecond:
- text += '.%d' % (dt.microsecond // 10000)
+ text += '.%d' % (dt.microsecond // 1000)
if dt.utcoffset():
seconds = dt.utcoffset().seconds