Skip to content

Commit

Permalink
Fix DB manager date time display in SQL window
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jun 8, 2020
1 parent 59ce5c8 commit 3d6c345
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/plugins/db_manager/db_plugins/postgis/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
QRegExp,
QFile,
QCoreApplication,
QVariant
QVariant,
QDateTime,
QTime,
QDate,
Qt,
)
from qgis.core import (
Qgis,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3d6c345

Please sign in to comment.