• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do i get timezone info from the HTTPServletRequest  RSS feed

 
mini meenakshi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The scenario is something like this :-
The server is in say Australia.
The user can log onto a server from any location.
I need to get the timezone info from user's request(HTTPServletRequest) &
display dates based on this timezone.
From HTTPServletRequest i can get the locale info but how can i get the Timezone info ?
Any help on this would be highly apprciated .
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no direct API to get it from the request. However since you can get the Locale from the request object, you could do something like:




See if it works.
[ August 04, 2006: Message edited by: jaikiran pai ]
 
ManishB Joshi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess this must work
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!