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
|
|
|