fixed issue 1390, dateTtime separator in MSSQL, thanks score2000

This commit is contained in:
mdipierro
2013-03-15 10:05:52 -05:00
parent e48074ff54
commit e4a96125a6
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.4-stable+timestamp.2013.03.15.10.00.02
Version 2.4.4-stable+timestamp.2013.03.15.10.05.12
+3 -1
View File
@@ -633,6 +633,7 @@ class BaseAdapter(ConnectionPool):
TRUE = 'T'
FALSE = 'F'
T_SEP = ' '
types = {
'boolean': 'CHAR(1)',
'string': 'CHAR(%(length)s)',
@@ -1810,7 +1811,7 @@ class BaseAdapter(ConnectionPool):
obj = str(obj)
elif fieldtype == 'datetime':
if isinstance(obj, datetime.datetime):
obj = obj.isoformat()[:19].replace('T',' ')
obj = obj.isoformat(self.T_SEP)[:19]
elif isinstance(obj, datetime.date):
obj = obj.isoformat()[:10]+' 00:00:00'
else:
@@ -3033,6 +3034,7 @@ class OracleAdapter(BaseAdapter):
class MSSQLAdapter(BaseAdapter):
drivers = ('pyodbc',)
T_SEP = 'T'
types = {
'boolean': 'BIT',