It's not a secret anymore!
The moose likes Java in General and the fly likes TimeZone Conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "TimeZone Conversion" Watch "TimeZone Conversion" New topic

TimeZone Conversion

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I would like to change from one timeone to GMT and vice versa. ANybody has any idea about this. When I use the offset for that timezone from GMT and the String to initialize the timezone and then parse the date, it still shows up as the local JVM timezone.
Can anyone throw some light on this?
Denise Hum

Joined: Oct 09, 2001
Posts: 20
Try using java.text.DateFormat and java.util.TimeZone. You can set the time zone in the DateFormat object and it will display the time in that zone.
I agree. Here's the link:
subject: TimeZone Conversion
jQuery in Action, 3rd edition