Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Date class not supported?
This thread has 3 replies. Displaying all posts.
Post 1 made on Sunday June 15, 2008 at 19:19
Derek Nickel
Founding Member
Joined:
Posts:
October 2001
8
I am creating a simple page with a big clock. I want the clock to change time a the correct moment, so I need to schedule the next display update to be the number of milliseconds remaining in the current minute. I was trying to use the Date class for this, but I am getting bad results.

Here's my Page ProntoScript.
var dsp = GUI.widget("TIME_DISPLAY");

UpdateDisplay();

function UpdateDisplay()
{
var d = new Date();
System.print(d.toString());
// set dsp.label
// calculate delay...
// scheduleAfter(delay, UpdateDisplay);
};

If run now, thee date that is displayed is:
Tue Feb 25 2031 03:02:11 GMT-0800
This is clearly wrong.

GUI.getDisplayTime() returns the correct time. Does this mean that the Date class is broken or unsupported or have I done something wrong.

Derek
Post 2 made on Sunday June 15, 2008 at 23:59
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
The date class is supported, just not for use as a real time clock on the remote. I asked for this when ProntoScript was released and due to lack of RTC hardware, Philips could not oblige.

The only thing you can do is to use GUI.getDisplayDate() or GUI.getDisplayTime() to get textual values that you can hopefully massage. As you cannot see Langage, TimeZone or DST settings from GUI, converting from String value may not be fortuitous.

However, if you are interested in only time deltas, new Date().valueOf() now is guaranteed to be a value of 20 higher than the same call 20 milliseconds ago.

This was discussed in a post by me around the time that ProntoScript was released. I believe you should be able to search for +new +Date +GUI +getDisplayTime and find the original post.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 3 made on Monday June 16, 2008 at 03:02
Derek Nickel
Founding Member
Joined:
Posts:
October 2001
8
Let me get this right, because the remote doesn't have an RTC, Philips can not provide the date and time, even though the remote obviously has some sort of clock. The Pronto clearly knows what time it is, Philips just doesn't want to share that information. Doesn't that sound screwy to you?

"new Date()" gives you a date and time, it's just way off. Repeated calls seem to yield internally consistent results (in terms of elapsed time). If it's about accuracy, wouldn't an almost-right value be better than a way-off value?

BTW, thanks for the information! I don't mean to complain to you, but to Philips.
Post 4 made on Monday June 16, 2008 at 20:09
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
Why not send an email to prontoteam at philips dot com?

It is a suspicion of mine about no hardware RTC. I could be wrong but I've looked at the motherboard of the 9600 and don't recall seeing one.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse