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.
Ord,
even my test on the ES400 show the stuck time.
This morning the time was in sync but after 4/5 hours moved just few minutes.
Pietro
Points: 0
You voted ‘up’
Something else:
Method toLocaleString() outputs the wrong month (one month early).
toDateString(), toUTCString() and toISOString() show the correct month.
Points: 0
You voted ‘up’
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
Points: 0
You voted ‘up’
Pietro,
you will have to keep that test page open for 24 hours to see if the problem is happening in your installation.
Regards,
Ord
Points: 0
You voted ‘up’
The problem is in fact different than I first described.
What happens is that the MC3100 goes to sleep after a period of inactivity, and the time within RhoElements stops advancing. Exiting and re-entering elements re synchronizes the clock with the system clock.
To reproduce, it is sufficient to start RhoElements, check that the time is correct, then power down (without exciting elements) for a few minutes. Power back up, and observe that the time shown in elements is no longer correct.
Points: 0
You voted ‘up’
Ord,
what OS is your MC3100 using, CE6 or WM6.5? and which BSP?
I've done my testing on an ES400 with WM6.5 and BSP31.02 and, at this moment, I don't see this issue.
~Pietro
Points: 0
You voted ‘up’
Thanks, I am glad to hear you can reproduce it. Now I need to find a solution, because our applications requires correct time stamps when we store information.
P.S. We used windows CE 6.0
Points: 0
You voted ‘up’
Do you know if there are plans to correct this, and when that might happen?
Points: 0
You voted ‘up’
I have found a temporary solution to this problem:
The WEBSQL engine uses the system time, not the RhoElements time, so we can query the database to get the correct time:
Points: 0
You voted ‘up’
The above fix does not work for RhoElements 1.0.2.3
In the earlier version, SELECT datetime('now','localtime')
return a bad value. For example, now it is saying "6461-12-31 05:36:13"
So, we can't use this work around.
Points: 0
You voted ‘up’
Ord,
Why are you using v1.0.2.3?, there is newer release of RhoElements 1 and then the shared runtime of version 2.
Version 1.0.3.11 is available on the support site:
http://support.symbol.com/support/search.do?cmd=displayKC&docType=kc&externalId=13526&sliceId=&dialogID=409290709&stateId=1%200%20409280838
Pietro
Points: 0
You voted ‘up’
Hi Pietro,
I have tested originally with 1.0.2.3 because that is what the client has installed. I checked here with the new version and found:
v1.0.3.11 does have the correct time in the WEBSQL engine, but wrong time from the javascript Date object. Also still has the error of showing one month early in the Date.toLocaleString() method. Version 2 behaves the same.
We will ask our clients to upgrade to 1.0.3.11 and put in a patch to get the time from the database until there is a fix to the runtime.
Points: 0
You voted ‘up’
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.
Points: 0
You voted ‘up’
Log in to post comments