From 86487cbae1ef781f7e0d5306a3a4228e79223ec3 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 17 May 2023 11:02:22 +0800 Subject: [PATCH] bugfix --- sqlor/sor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sqlor/sor.py b/sqlor/sor.py index a8c2c46..d506a70 100755 --- a/sqlor/sor.py +++ b/sqlor/sor.py @@ -20,7 +20,8 @@ def db_type_2_py_type(o): if isinstance(o,decimal.Decimal): return float(o) if isinstance(o,datetime): - return '%020d' % int(o.timestamp() * 1000) + # return '%020d' % int(o.timestamp() * 1000) + return str(o) if isinstance(o, date): return '%04d-%02d-%02d' % (o.year, o.month, o.day) return o