Issue #14720: sqlite3: Convert datetime microseconds correctly
Patch by Lowe Thiderman
diff --git a/Lib/sqlite3/dbapi2.py b/Lib/sqlite3/dbapi2.py
index 7eb28e8..be7a50a 100644
--- a/Lib/sqlite3/dbapi2.py
+++ b/Lib/sqlite3/dbapi2.py
@@ -68,7 +68,7 @@
timepart_full = timepart.split(".")
hours, minutes, seconds = map(int, timepart_full[0].split(":"))
if len(timepart_full) == 2:
- microseconds = int(timepart_full[1])
+ microseconds = int('{:0<6}'.format(timepart_full[1].decode()))
else:
microseconds = 0