Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-72109

QML Date wrong with Europe/Dublin timezone (and others)

    XMLWordPrintable

Details

    • Linux/X11

    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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Eddy Edward Welbourne
            vogtinator Fabian Vogt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes