This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes How to get client machine timeZone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to get client machine timeZone" Watch "How to get client machine timeZone" New topic

How to get client machine timeZone

Ajaybond Patilbond

Joined: Jan 19, 2006
Posts: 1
I want to do that i tried to convert datetime between the local
timezone of the SERVER machine (not the CLIENT machine) and the UTC datetime.

What I want to do in my WEB application is let the user at the client side
enter a datetime (using calendar) Then, when the page postback to the server
side, the appplication have to know from which timezone the CLIENT is (note
that: this is a WEB app. There are a thousand of clients from the internet)
and then convert the entered datetime into UTC datetime before saving it
into database. Later when showing the UTC datetime retrieved from our
database, I want first it is converted to the local CLIENT timezone before
show it on the web UI.
[ January 19, 2006: Message edited by: Bear Bibeault ]
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

You could just ask the user.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: How to get client machine timeZone
Similar Threads
Java Date problem
jsf page shows date one day back
Convert from Server UTC timezone to Client timezone
Converting from GMT to Local Timezone using two seperate fields (date & time).
Timezone related datetime conversion problem