timezone - How to use a custom time in browser to test for client vs server time difference -


i wrote little piece of code show server time in webpage. @ moment have 1 machine cannot test if code working.

is there way tell browser use time configuration different 1 configured in os? have used plugins firefox test different locales, wonder if there similar options time tests.

thanks.

unfortunately, javascript aware of current time zone, set operating system. there no facilities let date object use different time zone in particular context. there libraries time zone conversions, won't asking.

there "trick" can use though. browsers read system time zone when first started. if launch browser , then change time zone of computer, browser continue operate under old time zone. know google chrome on windows works way. tested ie10, picks new time zone.

one other thing though, said showing server time in web page. how getting that? php? .net? else? server time has no bearing on client or browser time, unless happen on same machine - during development.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -