| Author |
Date and Time calculations
|
Patil Niteen
Ranch Hand
Joined: Dec 10, 2009
Posts: 48
|
|
Hi,
I have date and time in IST . How to get the corresponding Date and Time In EST using Java API.
Thanks and regards,
Nitin.
|
SCJP 1.4, SCWCD 5
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2928
|
|
|
Please check JavaDatesFaq
|
Mohamed Sanaulla | My Blog
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
Do you have the date in a java.util.Date object?
One thing you should know is that Date objects do not know anything about timezones by themselves. When you convert the Date to a String using a DateFormat object, you can set the TimeZone on the DateFormat object if you want to have it formatted in a certain timezone. For example:
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: Date and Time calculations
|
|
|