summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/psql/qsql_psql.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-03-11 13:01:44 -0700
committerThiago Macieira <thiago.macieira@intel.com>2024-03-14 12:30:33 -0700
commit2781c3b6248fe4410a7afffd41bad72d8567fc95 (patch)
treed1be5218335ace749d2e853f33ef20320729693e /src/plugins/sqldrivers/psql/qsql_psql.cpp
parentb5d73636d27f1bba87980cf1bac6feb1ebd6360b (diff)
SQL/MySQL: pass UTC date/time stamps to the server
The MYSQL_TIME structure doesn't support per-datum timezone and in any case the server would not store it: the TIMESTAMP type is always stored in UTC. So instead let's configure the session time zone to UTC and use QDateTime to convert to/from it. Fixes https://bugs.kde.org/show_bug.cgi?id=483060 [ChangeLog][SQL][MySQL] Fixed a bug in passing QDateTime to be passed as local time to the server, regardless of the QDateTime's time zone setting. This would cause certain timestamps to be rejected by the server, such as a UTC time stamp whose time numerically matched the local timezone's spring forward gap in the transition into Daylight Savings Time. Change-Id: I6818d78a57394e37857bfffd17bbce4ae43e823c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Diffstat (limited to 'src/plugins/sqldrivers/psql/qsql_psql.cpp')
0 files changed, 0 insertions, 0 deletions