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

[BB10]QML/JS Date gets corrupted with negative UTC time offsets

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Won't Do
    • Affects Version/s: 5.2.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      1) Change the timezone to one with a negative UTC time offset, such as Alaska(-9).

      2) Run the following code:

          property var a: new Date();
          property variant b: new Date();
      
          Component.onCompleted: {
              var s="";
              s="{ Date: "+a+"; Time: "+a.getTime()+"; UTC-Offset"+a.getTimezoneOffset()+";}  ";console.log(s);
              s="{ Date: "+b+"; Time: "+b.getTime()+"; UTC-Offset"+b.getTimezoneOffset()+";}  ";console.log(s);
          }
      

      3) This the debug output:

      { Date: Thu Nov 19 17:51:04 2150 GMT+119303828; Time: 1413228168899; UTC-Offset-71582308.26666667;}
      { Date: Mon Dec 27 00:19:20 2286 GMT+119303728; Time: 5708199064899; UTC-Offset-71582248.26666667;}
      

      I'm using http://qtlab.blackberry.com/downloads/ndk_10.2.0_overlay/qt521_20140317/ on a Z10 with BB 10.3.1 and on a Q10 with BB 10.2.1

        Attachments

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

          Activity

            People

            Assignee:
            vminenko Vladimir Minenko
            Reporter:
            adrian.gabureanu Adrian Gabureanu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes