BrowserHawk IQ now available! Click here for the full scoop!
Search:
TimeZoneDiff not returning results as expected
Created: 5/29/2002    Updated: 5/29/2002
Q   I am testing the TimeZoneDiff property but it always returns 0. What could I be doing wrong?

A   There are two common misunderstandings that developers encounter when testing the TimeZoneDiff property:
  1. Please keep in mind that when testing with a browser that resides on the same machine as the web server (as is common during development), the TimeZoneDiff property will always be 0, regardless of which time zone is set. This is because the time zone changes you are testing get applied to both the browser and server.
  2. Also keep in mind that this property measures the difference in your time zone settings, not in your time itself. For example, if the machine you are testing from is set for Eastern Daylight Time (EDT), and the web server is also set for EDT, then the time zone difference will always be zero, despite whatever time you have set on your machine.
In summary, when testing to see the TimeZoneDiff property account for any differences, you should a) always make sure that the machine you are testing from is different than the machine serving your web pages, and b) makes sure that you change the time zone settings on the machine itself, not the actual time.

Note that if you are interested in the actual time on the machine where the browser is running from, you can get this through the BrowserDateTime and BrowserDateTimeMs properties. See the Property Reference Guide in the BH Documentation for details.

    FAQ Home  |  Search FAQ  |  Show New Items  |  Ask a FAQ  |  Notify Me  |  Most Popular     
 
 
Copyright © 1994-2020 cyScape, Inc. All Rights Reserved. ()
ASP, ASP.NET, ColdFusion MX, CFMX, JSP, PHP