Skip to content

Commit

Permalink
handle dates before 1900
Browse files Browse the repository at this point in the history
  • Loading branch information
collinanderson committed Apr 6, 2014
1 parent 3e70cdb commit 1f0df31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymysql/converters.py
Expand Up @@ -89,10 +89,10 @@ def escape_time(obj):
return escape_str(s)

def escape_datetime(obj):
return escape_str(obj.strftime("%Y-%m-%d %H:%M:%S"))
return escape_str(obj.isoformat(' '))

def escape_date(obj):
return escape_str(obj.strftime("%Y-%m-%d"))
return escape_str(obj.isoformat())

def escape_struct_time(obj):
return escape_datetime(datetime.datetime(*obj[:6]))
Expand Down

0 comments on commit 1f0df31

Please sign in to comment.