diff options
author | Petri Lehtinen <petri@digip.org> | 2013-02-23 18:05:09 (GMT) |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2013-02-23 18:05:56 (GMT) |
commit | 8b945148e3f98b9c6c51bfaa830e779979713b82 (patch) | |
tree | 1a1a47af35e3a998dd59226f0b72b8a03c7ac55a /Lib/sqlite3/dbapi2.py | |
parent | ed909bcbddfa9c956fbbbb4a1b6a375d3e0e6599 (diff) | |
download | cpython-8b945148e3f98b9c6c51bfaa830e779979713b82.zip cpython-8b945148e3f98b9c6c51bfaa830e779979713b82.tar.gz cpython-8b945148e3f98b9c6c51bfaa830e779979713b82.tar.bz2 |
Issue #14720: sqlite3: Convert datetime microseconds correctly
Patch by Lowe Thiderman
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 6c121a5..1048992 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 |