mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2026-03-13 08:00:02 +08:00
Work around short timestamps.
This commit is contained in:
@@ -101,6 +101,8 @@ hosed_connection = (
|
||||
)
|
||||
|
||||
def _mysql_timestamp_converter(s):
|
||||
if len(s) < 14:
|
||||
s = s + ["0"]*(14-len(s))
|
||||
parts = map(int, (s[:4],s[4:6],s[6:8],
|
||||
s[8:10],s[10:12],s[12:14]))
|
||||
return DateTime("%04d-%02d-%02d %02d:%02d:%02d" % tuple(parts))
|
||||
|
||||
Reference in New Issue
Block a user