Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TimeZone Conversion

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic