Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.6, 5.9.4, 5.9
-
None
Description
Although Europe/Dublin is equal to GMT and UTC currently, new Date().getTimezoneOffset() returns -120.
This is because of a change in the timezone data (introduced in 2018a, but reverted in 2018c, but now enabled as part of 2018e again):
Bring back the negative-DST changes of 2018a, except be more
compatible with data parsers that do not support negative DST.
Also, this now affects historical time stamps in Namibia and the
former Czechoslovakia, not just Ireland. The main format now uses
negative DST to model time stamps in Europe/Dublin (from 1971 on),
Europe/Prague (1946/7), and Africa/Windhoek (1994/2017). This
does not affect UT offsets, only time zone abbreviations and the
tm_isdst flag. Also, this does not affect rearguard or vanguard
formats; effectively the main format now uses vanguard instead of
rearguard format. Data parsers that do not support negative DST
can still use data from the rearguard tarball described below.
Minimal reproducer:
import QtQuick 2.0 QtObject { Component.onCompleted: { console.log(new Date().getTimezoneOffset()); } }
Expected output (with tzdata < 2018a or Qt >= 5.10):
qml: 0
Actual output:
qml: -120
Attachments
For Gerrit Dashboard: QTBUG-72109 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
247207,2 | V4 Date: fix what we can within ECMA 262's limitations | 5.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |