This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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..:-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: capturing timezone from a browser???
 
Similar Threads
-Duser.timezone
Convert Date from one timezone to another
Calendar
websphere pb with timezone
<bean:message> and jquery