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

Negative dates in C++ are not converted to JavaScript correctly

    XMLWordPrintable

Details

    Description

      Negative dates in C++ are always one year further into the future when converted to JavaScript.

      QML from the attached project:

      import QtQuick 2.0
      import test 1.0
      
      Item {
          id: root
      
          QuickDate {
              Component.onCompleted: {
                  console.log("  actual date = " + date);
                  console.log("expected date = " + new Date(-2000, 0, 1));
              }
          }
      }
      

      Output:

      actual date = Mon Jan 01 -1999 00:00:00 GMT+0100 (CET)
      expected date = Sat Jan 01 -2000 00:00:00 GMT+0100 (CET)

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes