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

WASM: (new Date()).getHours() gives wrong hour

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.15.2
    • Core: Date/Time
    • None
    • Qt 5.15.2 emscripten 1.39.8
      Windows 10 (20H2)
      Firefox: 87.0 (64-Bit)
      Chrome: Version 89.0.4389.90 (Offizieller Build) (64-Bit)
    • WebAssembly

    Description

      I have been using in a QML App javascript to get the hour:

      (new Date()).getHours()
      

      After Updating to Qt 5.15.2(previous Version was 5.14.0 Beta2) the returned hour is wrong by -1.

      I screenshots of the attached examples:
      Browser:

      Windows:

      Simple HTML Javascript:

      The timezone in Windows is set to UTC+01:00 with automatic daylight savings.

      Attachments

        1. Example_JS.html
          0.4 kB
          Marscho
        2. ExampleDateAndTime.zip
          2 kB
          Marscho
        3. image-2021-03-26-14-03-40-348.png
          19 kB
          Marscho
        4. image-2021-03-26-14-04-06-557.png
          7 kB
          Marscho
        5. image-2021-03-26-14-04-48-921.png
          6 kB
          Marscho

        Issue Links

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

          Activity

            People

              Eddy Edward Welbourne
              Marscho Marscho
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes