How do I use my server clock for the current time instead of relying on clients browser?
A- Using server time has some advantages. It obviates the use of the client’s clock which might not be accurate. Time zone and daylight savings issues are also avoided. However, server resources must be used to set the current time dynamically every time the page is accessed. You would need access to server-side scripting to make that possible. The quickest way to achieve this is to change your page extension to a server-processed one (such as .php, .asp, .aspx, .jsp, etc.) that your server supports. You would need to download countdown.js, incorporate it into your page, and modify one line. the line to change is towards the end of the script where “dnow” is declared as: var dnow = new Date(); For example, in PHP you would use: var dnow = new Date(““); In ASP (JScript) you would use: var dnow = new Date(“<%= new Date() %>“); If your server supports SSI, then you can declare the following: var dnow = new Date(“
A- Using server time has some advantages. It obviates the use of the client’s clock which might not be accurate. Time zone and daylight savings issues are also avoided. However, server resources must be used to set the current time dynamically every time the page is accessed. You would need access to server-side scripting to make that possible. The quickest way to achieve this is to change your page extension to a server-processed one (such as .php, .asp, .aspx, .jsp, etc.) that your server supports. You would need to download countdown.js, incorporate it into your page, and modify one line.