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

QML date-type properties time travel into the past by one day when imperatively assigned a string value (time-zone dependent!)

    XMLWordPrintable

Details

    • 5c672954e391d43e1fb94e6d76aaedc987dea468 (qt/qtdeclarative/dev)

    Description

      Look at the code below (also linked) – the strings displayed are the same with local time zone set to GMT+3, but different with GMT-5:

      import QtQuick 2.0
      
      Item {
          width: 400; height: 200
      
          property date date1: "2014-02-04"
          property date date2
      
          Text {
              anchors.centerIn: parent
              text: date1 + "\n" + date2
          }
      
          Component.onCompleted: date2 = "2014-02-04"
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              mlvljr Vladimir M.
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes