|
|
|
Philips Pronto Professional Forum - View Post
|
|
|
|
|
|
|
The following page was printed from RemoteCentral.com:
Date & Time "strange" values
| |
|
Topic: | Date & Time "strange" values This thread has 3 replies. Displaying all posts. |
|
Post 1 made on Tuesday July 1, 2014 at 03:12 |
Fbrighi Long Time Member |
Joined: Posts: | September 2010 52 |
|
|
Hello all,
I have a curious case to ask you for. I have my TS9600 programmed with proper made java script program, so it is able to calculate the estimated time of a movie to finish. In practice, it takes the remaining time value from an Oppo player (by rs232), and it adds the seconds value to the actual time. Script is this :
//Calcoli & orari di credits, fine e intervallo var OraFine = new Date(); var OraCredits = new Date(); var OraIntervallo = new Date(); if ((Intervallo == false) && (CalculateSeconds(offsetintervallo) > 0)) { OraFine.setSeconds(CalculateSeconds(remaining) + breaklenght); OraCredits.setSeconds(CalculateSeconds(offsetcredits) - CalculateSeconds(elapsed) + breaklenght); } else { OraFine.setSeconds(CalculateSeconds(remaining)); OraCredits.setSeconds(CalculateSeconds(offsetcredits) - CalculateSeconds(elapsed)); } OraIntervallo.setSeconds(CalculateSeconds(offsetintervallo) - CalculateSeconds(elapsed)); percent = parseInt(100*(CalculateSeconds(elapsed)/(CalculateSeconds(remaining) + CalculateSeconds(elapsed))));
Until some month ago all worked fine. Yesterday, for first time, i noted that the "calculated hours" (OraFine, OraCredits & OraIntervallo) values are +1h respect to what they should be. Example : if present time is 16.00, remaining time is 1h, instead of showing 17.00 as end time, it shows 18.00.
What can be the reason? I checked date & time settings and they are ok, i was thinking some issue related to "legal time"...but found no options to set up on my pronto...and anyway present hour is correctly set up.
Any idea about what can be the issue? This same program worked fine until few weeks ago...
Thanks and Best regards,
FKB
|
FKB |
|
Post 2 made on Wednesday July 2, 2014 at 08:34 |
Lyndel McGee RC Moderator |
Joined: Posts: | August 2001 12,992 |
|
|
You are running into an issue where the JavaScript engine is in DST and maybe your time is not? Relying on new Date() as a time base is not reliable. [Link: remotecentral.com]I could not find my other thread but this thread pretty much sums it up. Your best bet? Hit some http server and get the current date/time from the response header.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
OP | Post 3 made on Monday July 28, 2014 at 06:50 |
Fbrighi Long Time Member |
Joined: Posts: | September 2010 52 |
|
|
Hello, thanks for help. Looking more close to PIP settings, i found that my Pronto was set up on wrong time zone (Dublin, instead of Berlin/Rome) and with daylight saving off...once corrected this, all worked fine.
Thank you anyway for your suggestion.
BR FKB
|
FKB |
|
Post 4 made on Tuesday January 5, 2021 at 11:52 |
kanikamalhotra Junior Member |
Joined: Posts: | January 2021 1 |
|
|
|
|
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.
|
|
|
|