Setting Calendar time zone to UTC causes weird problems. Please see sample below:
This the output doesn't make sense to me at all.
In first sysout the time is correct. In second sysout using SimpleDateFormatter time is changed to 11.55 AM, that is just outright weird.
Int third sysout time goes to 17.55 PM, which is again unexpected. And finally using SImpleDateFormat again, it prints out expected time.
Any comments or explanations why this happens are warmly welcomed
My technical stats:
OS - Ubuntu 8.04
Java - 1.6.0_07
by the above statement ...the time field of the calculator object never gets changed......but infact the other fields with in the calculator gets initialized ...the otherfileds like dstSavings , useDaysavings etc....
to check this you can actually print the 'cal' object using print statement ...
or you can compare two object outputs....like below
if you run above...the time field would show same time (with few millisecond gap for comiler) for both the instaces like GMT and NZ-CHAT...but the other fileds of the object differ..
the above statement just gets the time field out of the cal object... with out any effect of timezone field..
in the above line time1 would be still same.....but when it formats it makes use of timezone to amend it and print the localized time....for the timezone mentioned