Link to home
Start Free TrialLog in
Avatar of Web_Sight
Web_Sight

asked on

Calculate browser time on a website

Hi,

We have a requirement to show a day/night functionality on a website - when a user accesses the website, depending on the user's timezone, a different template will load for the same website to depict whether it is day/night.

We have put in a script  which however does not behave correctly at times. There have been many instances when we have logged in during the day to see the night template or vice -versa. We have also noticed that the script does not work in Safari browser.

Does anyone know of a script/function that will satisfy our requirement and is browser compatible?

Thanks
Avatar of Brian Pringle
Brian Pringle
Flag of United States of America image

Your best bet would be to do this as a server-side script.  Are you using PHP or ASP?  If so, you could do it there and not leave it up to the Web browser to make the decision.  This would make it cross-platform and would allow your server to control it -- not the end user's computer.
ASKER CERTIFIED SOLUTION
Avatar of Maximus5684
Maximus5684
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Web_Sight
Web_Sight

ASKER

Not an exact answer