diff options
author | Petri Lehtinen <petri@digip.org> | 2013-02-23 19:10:29 +0100 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2013-02-23 19:10:29 +0100 |
commit | e460f26b2582606faa7b64e5dc8643b560472f0d (patch) | |
tree | 6e7ad4dfaa1a88ea52c65a9ce18d01012e166109 /Lib/sqlite3/dbapi2.py | |
parent | 20054477f4671150e098b519dc1b85d7db6d27ab (diff) | |
parent | f484efdb60cf97d04eed4f87f838ad27e1ed241f (diff) | |
download | cpython-git-e460f26b2582606faa7b64e5dc8643b560472f0d.tar.gz |
Issue #14720: sqlite3: Convert datetime microseconds correctly
Diffstat (limited to 'Lib/sqlite3/dbapi2.py')
-rw-r--r-- | Lib/sqlite3/dbapi2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sqlite3/dbapi2.py b/Lib/sqlite3/dbapi2.py index 6c121a5c06..1048992402 100644 --- a/Lib/sqlite3/dbapi2.py +++ b/Lib/sqlite3/dbapi2.py @@ -67,7 +67,7 @@ def register_adapters_and_converters(): timepart_full = timepart.split(b".") hours, minutes, seconds = map(int, timepart_full[0].split(b":")) if len(timepart_full) == 2: - microseconds = int(timepart_full[1]) + microseconds = int('{:0<6}'.format(timepart_full[1].decode())) else: microseconds = 0 |