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

[REG 5.15 -> 6.2] Date.parse() can't handle some dates on Qt 6 but works in Qt 5

    XMLWordPrintable

    Details

    • Platform/s:
      All
    • Commits:
      41a5c7b223 (qt/qtdeclarative/dev) 41a5c7b223 (qt/tqtc-qtdeclarative/dev) 7ac3dfc2d1 (qt/qtdeclarative/6.3) 7ac3dfc2d1 (qt/tqtc-qtdeclarative/6.3) 078dcd3bf5 (qt/qtdeclarative/6.2) 078dcd3bf5 (qt/tqtc-qtdeclarative/6.2) 078dcd3bf5 (qt/qtdeclarative/6.2.4)

      Description

      JavaScript engine in Qt 6 can't parse the date 'Sun, 25 Mar 2018 11:10:49 GMT' but works in Qt 5

      QJSEngine eng;
      qDebug() << eng.evaluate("new Date('Sun, 25 Mar 2018 11:10:49 GMT').getTime()").toUInt();
      

      Qt 5 prints: "1557826216"
      Qt 6 prints: "0"

      The same behavior appears while using "Date.parse()"

        Attachments

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

          Activity

            People

            Assignee:
            Eddy Edward Welbourne
            Reporter:
            ighor IGHOR
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes