diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2024-03-11 13:01:44 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2024-03-14 12:30:33 -0700 |
| commit | 2781c3b6248fe4410a7afffd41bad72d8567fc95 (patch) | |
| tree | d1be5218335ace749d2e853f33ef20320729693e /src/plugins/sqldrivers/psql/qsql_psql.cpp | |
| parent | b5d73636d27f1bba87980cf1bac6feb1ebd6360b (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
