Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.12.4
-
None
-
Ubuntu 18.04
-
b26ac46c5956e716821e64f291749be110731f16 (qt/qtbase/5.15)
Description
With the following minimal example:
import QtQuick 2.12 Item { Component.onCompleted: console.log("TimezoneOffset:", (new Date()).getTimezoneOffset()) }
This shows a correct timezone offset for my system settings:
$ ~/Qt/5.12.4/gcc_64/bin/qmlscene TimezoneOffsetTest.qml qml: TimezoneOffset: 240
But when run with the timezone set via the TZ environment variable, zero is always returned:
$ TZ=UTC+10 ~/Qt/5.12.4/gcc_64/bin/qmlscene TimezoneOffsetTest.qml qml: TimezoneOffset: 0