Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 100485f

Browse filesBrowse files
author
jinuk84.kim
committed
microsecond-bug-fix for datetime.datetime
1 parent c8b2744 commit 100485f
Copy full SHA for 100485f

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎MySQLdb/times.py

Copy file name to clipboardExpand all lines: MySQLdb/times.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ def DateTime_or_None(s):
5151

5252
try:
5353
d, t = s.split(sep, 1)
54-
return datetime(*[ int(x) for x in d.split('-')+t.split(':') ])
54+
if '.' in t:
55+
t, m = t.split('.',1)
56+
else:
57+
m = 0
58+
return datetime(*[ int(x) for x in d.split('-')+t.split(':')+[m] ])
5559
except (SystemExit, KeyboardInterrupt):
5660
raise
5761
except:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.