Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
FULL PRODUCT VERSION : java version "1.3.1_19" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_19-b03) Java HotSpot(TM) Client VM (build 1.3.1_19-b03, mixed mode) ADDITIONAL OS VERSION INFORMATION : Solaris 10 A DESCRIPTION OF THE PROBLEM : The new DST rules for North America starting next year still haven't been added to 1.3.1. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile and run the attached code. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Mon Mar 12 00:00:00 EDT 2007 ACTUAL - Mon Mar 12 00:00:00 EST 2007 REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.util.Date; import java.text.SimpleDateFormat; public class TestTime { public static void main(String[] args) throws Exception { System.out.println(new Date()); SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); Date settlementDate = format.parse("20070312"); System.out.println(settlementDate); } } ---------- END SOURCE ----------
|