Skip to content
Permalink
Browse files

Fix DB manager date time display in SQL window

Fixes #35140
  • Loading branch information
elpaso authored and nyalldawson committed Jun 8, 2020
1 parent 18ea6a9 commit 21f6f576b9dd99b1abf0b693d1f248669690b0d5
Showing with 7 additions and 1 deletion.
  1. +7 −1 python/plugins/db_manager/db_plugins/postgis/connector.py
@@ -30,7 +30,11 @@
QRegExp,
QFile,
QCoreApplication,
QVariant
QVariant,
QDateTime,
QTime,
QDate,
Qt,
)
from qgis.core import (
Qgis,
@@ -84,6 +88,8 @@ def _toStrResultSet(self, res):
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

0 comments on commit 21f6f57

Please sign in to comment.
You can’t perform that action at this time.