01-06-2011 09:57 AM
Does anyone know of a way to set the time in the Simulator? My simulator always seems to be 4 hours behind. Maybe its related to my timezone, which is Eastern (GMT - 4).
I was able to figure out (accidentally) that the date in the Simulator is based on whatever date your OS has. I had my OS (Windows 7 in my case) date set 1 day in advance by mistake and saw that the last modified time stamps on files I was creating in my PlayBook app were one day in advance too.
However, I haven't found any way to change the time, which is always wrong in my case. Does anyone else have this time shift problem?
My app syncs files on the Playbook to a remote server, so having the correct last modification date for files is kind of important
I could do some workaround where I manually adjust the hours in my code and remove it for the production version. But I was wondering if anyone has other ideas?
Thanks!
01-06-2011 10:00 AM
hey alinium,
currently there is no "official" way to change the time on the simulator. however if someone were to find a prefence file in the system that stored the timezone then it'd be most likely be possible to edit that file and fix the clock. but until then your best bet is to use the workaround you mentioned.
01-06-2011 11:22 AM
alinium wrote:
Does anyone know of a way to set the time in the Simulator? My simulator always seems to be 4 hours behind. Maybe its related to my timezone, which is Eastern (GMT - 4).
However, I haven't found any way to change the time, which is always wrong in my case. Does anyone else have this time shift problem?
I do, and I believe most people would have the problem, but I've found several workarounds.
The simplest so far is to telnet into the device as the root user, using the same thing as password, and type "rtc -l hw". This tells QNX that the "hardware" clock (i.e. what it gets from the virtual machine) is in local time. Check the date before and after with the "date" command... it should show the change immediately. The on-screen clock will change the next time it advances the minutes.
I don't know for sure whether this will fix the issue for anyone outside of Eastern time as, at least on my unit, the timezone for the device is EDT. On the other hand, that's also the timezone for Waterloo, so maybe RIM hardcoded it in the image for now.
An alternative is simply to adjust the time with the date command. Just enter "date HHMM" and it should update immediately (again, the screen may lag). Type "use date" to get help for other options.
This is also not a persistent change. It sounds like you would benefit from a persistent change here, so try this instead, though not that it's both undocumented and not even necessarily correct, but it works here.
Again, using telnet, type "echo _CS_TIMEZONE::utc>>/pps/services/confstr/_CS_TIMEZ![]()
That will tell your simulator that it's using UTC instead of the default (which at least here and presumably for you is EDT04. Here it results in the output of "date" changing immediately to show UTC, which makes the onscreen display read the correct wall-clock time when it next updates. Obviously we're not really in UTC, so this is fudging things. If you are making use of the timezone information in your app, I expect this one won't give you quite the results you need, unless for some reason this doesn't affect what ActionScript sees for the Date object.
I don't think there's a way to make a correct change (e.g. with "rtc -l hw") persistent yet as we don't really have a hardware clock, just the fake one that is presumably set up by VMWare when it launches -- and that appears to reset each time back to your own machine's time.
01-08-2011 02:26 PM
Hey,
I am in the Atlantic time and I can confirm that the simulator is set to Eastern time by default. But I did some playing around and looking through QNX Developer documentation and found that you can set the timezone like:
# echo _CS_TIMEZONE::AST4ADT >> /pps/services/confstr/_CS_TIMEZONE # rtc -l hw
Then you can see the current date in the local timezone and utc
# date Sat Jan 08 15:25:27 AST 2011 # date -u Sat Jan 08 19:25:28 UTC 2011
For information on other timezone formats see:
http://www.qnx.com/developers/docs/6.3.0SP3/neutri
01-09-2011 05:37 PM
Maybe a silly question, but what is the VMWare - BB PlayBook login/password? I tried everything I could think of and searched the Web, but there's not much out there for playbook atm =).
01-09-2011 06:13 PM
it is root/root
I haven't seen it documented anywhere either.. just figured it out from some posts on here ![]()
01-09-2011 06:55 PM
Scroll up and see Peter's post.