Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.11.3, 5.14.2
-
None
Description
Given a postgresql table with a column with type timestamptz:
create table patients ( patient_id serial not null, date_time_added timestamptz not null );
The table has one row with date_time_added with value 2020-08-03 12:45:34.335-03
I query the table with:
QSqlQuery query;
if(query.exec("SELECT patient_id, date_time_added FROM patients")) { query.next(); auto dTA = query.value(1).toDateTime(); qDebug() << dTA.toString(Qt::IsoDateWithMs); }
I would expect to see the timezone in the string, but I get the string without it. I need to manually set the time zone in order to get the right value.