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

    • 5c672954e391d43e1fb94e6d76aaedc987dea468 (qt/qtdeclarative/dev)

      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"
      }
      

        For Gerrit Dashboard: QTBUG-36635
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes