13 Replies Latest reply on Aug 22, 2012 12:29 PM by Darryn Campbell

    RhoElements Date bug

      Using RhoElements on Windows CE:

       

      var theDate = new Date();

       

      theDate will have the date that the RhoElements App started running, not the current date. The time portion is also incorrect, but does keep advancing (there is a discrepancy between the time returned and the system time, but it seems to be small, about 30 minutes). The only way I have found to get the date to update is to exit and re start the app.

       

      We have found this with the runtime versions 1 and 2, on both an MC3100 and MC3190.

        • Re: RhoElements Date bug

          Something else:

           

          Method toLocaleString() outputs the wrong month (one month early).

          toDateString(), toUTCString() and toISOString() show the correct month.

            • Re: RhoElements Date bug
              Pietro Francesco Maggi

              Hi Ord,

              the small test that follows works correctly with RE 1.0.3.11 on an ES400. Well, pressing the Update button, you see that the DateTime is correct. But you are right, the toLocaleString() report the wrong month (one early).

               

              Sample code:

               

              <html>

              <head>

              <title>Date Sample</title>

              <script type="text/javascript">

              function fnUpdateDate() {

                  var currentTime = new Date()

                  var month = currentTime.getMonth() + 1

                  var day = currentTime.getDate()

                  var year = currentTime.getFullYear()

                  var myContent = month + "/" + day + "/" + year + "<BR>" + currentTime.toLocaleString()

                  //alert(myContent);

                  document.getElementById('para').innerHTML = myContent;

              }

              </script>

              </head>

              <body>

              <h4>It is now</h4>

              <p id='para'> </p>

              <input type="button" onclick="fnUpdateDate()" value="Update"/>

              </html>

               

              ~Pietro

            • Re: RhoElements Date bug
              Darryn Campbell

              Hi,

               

              Please forgive that I haven't read the entire thread here but reading your first post I recognise the issue.

               

              Unfortunately this was fixed just too late to make it into our 2.1 drop due out next week The fix for this will be in 2.2.

               

              Regards,

              Darryn.