I want clarify one thing.
I installed j2sdk1.4.2_03 and jdk1.7 in my system.
when i run the following program it gives two different result in two version of java my system timezone setting is -08:00 (Pacific US & Canada )
Please read the important administrative private message I just sent you.
Joined: Jul 10, 2007
Campbell Ritchie wrote:Please read the important administrative private message I just sent you.
Joined: Oct 13, 2005
Welcome to JavaRanch
It is worthwhile checking whether there have been any changes to the rules about daylight saving time in the USA between 2001 when J2SE1.4 came out and 2006 when Java6 came out. That might explain the difference. Apart from that, I am afraid, don't know.
By the way, what's jdk1.7? Java7 hasn't been issued yet. Is it a version of gcj? I seem to remember my Fedora compiler is capable of saying it's 1.7.
If you see, both the times are same the only difference is the default value of timezone.
Please see this... http://java.sun.com/javase/timezones/.. java guys talk about this thing. I think 2007 onwards there are standard days when Daylight saving will be done so java compute the time zone (with daylight saving) based on these rules. In your programme, if yoy change the month to 12 (from 10)... you will start seeing time in -8:00 hrs.