BrowserHawk IQ now available! Click here for the full scoop!
Search:
Can I detect the locale and timezone?
Created: 4/18/2001    Updated: 9/28/2004
Q   Can BrowserHawk detect the locale of a browser, i.e. the country/timezone the user has set on his machine?

A   Yes, you can detect this as follows:
  • LangUser - returns the language the user has set up in their OS
  • LangSystem - language code corresponding to the language edition of the installed operating system. Requires IE 4+ any platform.
  • BrowserDateTime - locale date/time from the user's machine
  • TimeZoneDiff - Returns the time zone difference in hours between the time zone the browser is running in and the time zone your web server is running in. Positive numbers indicate that the browser is ahead by that many hours, negative numbers indicate behind. For example, if your web server is running on Eastern Standard Time and the browser is running on a machine set for Pacific time, the value of TimeZoneDiff will be -3 to indicate 3 hours behind.
Note that use of these features requires the Professional or Enterprise Editions of BrowserHawk.

If you want to detect the specific country the user is in, you can use CountryHawk for that.

    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