Fix DB manager date time display in SQL window

Fixes #35140
This commit is contained in:
Alessandro Pasotti 2020-06-08 18:17:05 +02:00 committed by Nyall Dawson
parent 18ea6a98c1
commit 21f6f576b9

View File

@ -30,7 +30,11 @@ from qgis.PyQt.QtCore import (
QRegExp,
QFile,
QCoreApplication,
QVariant
QVariant,
QDateTime,
QTime,
QDate,
Qt,
)
from qgis.core import (
Qgis,
@ -84,6 +88,8 @@ class CursorAdapter():
col = None
else:
col = str(col) # force to string
if isinstance(col, QDateTime) or isinstance(col, QDate) or isinstance(col, QTime):
col = col.toString(Qt.ISODate)
newrec.append(col)
newres.append(newrec)
return newres