| Author |
Calendar.getTime()
|
Himalay Majumdar
Ranch Hand
Joined: Sep 28, 2008
Posts: 324
|
|
Please see the code below..
In a particular iteration @line 12
I watch ..
memoType.getMemoDate() evaluatesTo 2009-12-23Z
but memoType.getMemoDate().getTime() evaluatesTo Tue Dec 22 19:00:00 EST 2009 (going to the previous date)
Any idea why is this happening, any workaround.
Thank you
-Himalay
|
SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
|
 |
Bupjae Lee
Ranch Hand
Joined: May 14, 2007
Posts: 107
|
|
"2009-12-23Z" actually means "Wed Dec 23 00:00:00 GMT 2009"
GMT stands for "Greenwich Mean Time", the worldwide standard time
EST stands for "Eastern Standard Time", (probably) your local time.
EST is 5 hours behind GMT (without daylight saving time)
The conclusion is that "2009-12-23Z" and "Tue Dec 22 19:00:00 EST 2009" represents same moment
It seems that the time zone of your java.util.Calendar instance is not set properly.
|
 |
Himalay Majumdar
Ranch Hand
Joined: Sep 28, 2008
Posts: 324
|
|
Thanks for taking your time on this Bupjae, I figured this out on the same day after decoding the mystery behind the Z..
All I need to know now is if the setting of the time is done before we consume the web service. Thanks again.
|
 |
 |
|
|
subject: Calendar.getTime()
|
|
|