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.