fix: dashboard editor run error (#1380)

This commit is contained in:
Aries-ckt
2024-04-07 15:04:28 +08:00
committed by GitHub
parent f2a6284c0e
commit d4da50330f
3 changed files with 23 additions and 12 deletions

11
dbgpt/util/date_utils.py Normal file
View File

@@ -0,0 +1,11 @@
import datetime
def is_datetime(value):
return isinstance(value, datetime.datetime)
def convert_datetime_in_row(row):
return [value.strftime('%Y-%m-%d %H:%M:%S') if is_datetime(value)
else value for value in row]