aspose file tools*
The moose likes Java in General and the fly likes capturing timezone from a browser??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "capturing timezone from a browser???" Watch "capturing timezone from a browser???" New topic
Author

capturing timezone from a browser???

deep venu
Ranch Hand

Joined: Jun 09, 2001
Posts: 56
In my Web-based application i need to capture the user's local time/ timezone so that i can have the GMT - offset and there by have an appropriate entry in the database.
Any pointers please???
thank U
~Dee
Mike Titus
Greenhorn

Joined: Sep 16, 2001
Posts: 2
Use JavaScript to get the current date and time in the client's browser, and send that value back to the server using a GET or POST. This isn't complete, but it will give you the idea:
<BODY onLoad="form.currentDate = new Date()">
<FORM NAME="form" METHOD="post">
<INPUT NAME="currentDate" TYPE="hidden">
</FORM>
</BODY>

[This message has been edited by Mike Titus (edited October 01, 2001).]
deep venu
Ranch Hand

Joined: Jun 09, 2001
Posts: 56
thanx buddy lemme try it out and get back to u..:-)
 
 
subject: capturing timezone from a browser???