From 5f794098898b49650b2ef6a0c4f48aa0d03b0298 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Tue, 26 Feb 2013 21:32:02 +0200 Subject: Issue #14720: Enhance sqlite3 microsecond conversion, document its behavior --- Lib/sqlite3/dbapi2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/sqlite3/dbapi2.py') diff --git a/Lib/sqlite3/dbapi2.py b/Lib/sqlite3/dbapi2.py index 1048992402d..9a0b76645e1 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('{:0<6}'.format(timepart_full[1].decode())) + microseconds = int('{:0<6.6}'.format(timepart_full[1].decode())) else: microseconds = 0 -- cgit v1.2.3