This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

time zones

 
Chanpreet Julka
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a java aplication that has to convert standard time to GMT using time zone. I am not sure how to go about this, so some general advice would be helpfull. Thank you.
 
Lewin Chan
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought standard time was GMT...
Assuming that the time you're trying to convert has a timezone in it, and you are currently in the GMT timezone, then you could use the java.text.SimpleDateFormat object.

Or something like that
 
Chanpreet Julka
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ill try it out. thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic