Click to See Complete Forum and Search --> : how does one detect the server date instead of the client date?


DavidS
11-01-2003, 10:58 PM
I recently borrowed some code from the "Perpetual Callendar Quotes" script featured in this library. I've used the script's arrays to store site news, and update itself based on the date. However, if a lazy user like me has an incorrect date set on his machine, the quote, or in this case news, will display incorrectly. This is because the script detects the client's date/time, rather than the server's. Is there a way to detect the server's clock rather than the client's?

Khalid Ali
11-02-2003, 07:28 AM
No.
However,you can set a date string using server side scripting and then create a date object from that string in js,from that point on you can use that date object for validations