mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 11:10:58 +08:00
Really work around short timestamps.
This commit is contained in:
@ -102,7 +102,7 @@ hosed_connection = (
|
||||
|
||||
def _mysql_timestamp_converter(s):
|
||||
if len(s) < 14:
|
||||
s = s + ["0"]*(14-len(s))
|
||||
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