This commit is contained in:
yumoqing 2023-05-17 11:02:22 +08:00
parent 4bd0130759
commit 86487cbae1

View File

@ -20,7 +20,8 @@ def db_type_2_py_type(o):
if isinstance(o,decimal.Decimal): if isinstance(o,decimal.Decimal):
return float(o) return float(o)
if isinstance(o,datetime): if isinstance(o,datetime):
return '%020d' % int(o.timestamp() * 1000) # return '%020d' % int(o.timestamp() * 1000)
return str(o)
if isinstance(o, date): if isinstance(o, date):
return '%04d-%02d-%02d' % (o.year, o.month, o.day) return '%04d-%02d-%02d' % (o.year, o.month, o.day)
return o return o