Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.2
-
None
-
ubuntu 16.04, gcc 6.3, amd64
-
c27348985d528030d2b7d69f1734a26e421172b6
Description
When an item model returns a QDateTime for the Qt::ToolTipRole, the tooltip text always shows the local timezone not the timezone of the QDateTime. It does not convert the time/timezone, so the tooltip displayed represents a different point in time.
For example, in my local timezone (AEST), QLocal::toString(QDateTime) returns:
Saturday, 27 May 2017 12:00:00 AM UTC
but tooltip shows
Saturday, 27 May 2017 12:00:00 AM AEST
These times are not equal.
In main.cpp attached the view shows the correct timezone, the tooltips show an incorrect timezone. The example might be affected by the host's regional settings.