File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Browser zone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Browser zone" Watch "Browser zone" New topic
Author

Browser zone

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Helo!
Is there any way to ask what timezone the client (=browser) is?
------------------
Antti Barck
It Solutions Consultant -- NSD Oy
Sun Certified Programmer for the Java� 2 Platform
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Hi,
you could use the JavaScript Date object (see http://developer.netscape.com/docs/manuals/js/client/jsref/date.htm)
You would most likely need to parse the results of the toString() method to find the timezone, and check the results on different browsers, for example when I tried the following code in IE, my time zone was PDT, and in Netscape it was "Pacific Daylight Time".

Hope this helps,
James.
[This message has been edited by james swan (edited August 27, 2001).]
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Helo Jim!
Of course JavaScript runs on client side, thx How did I not figure that out myself, instead I was hunting some other parts of the request. This is good thing but need some thinking for incorporation. Thx again
------------------
Antti Barck
It Solutions Consultant -- NSD Oy
Sun Certified Programmer for the Java� 2 Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Browser zone
 
Similar Threads
simple web browser in java
can't back to previous page in JSF
how to invalidate a session when browser is closed
problem with mouseMoved method
Mobile Connectivity With Server. (SMS)