-
Bug
-
Resolution: Fixed
-
P2
-
1.3.1_11, 1.3.1_13
-
b01
-
other, x86, sparc
-
solaris_2.5.1, solaris_9, windows_xp
Name: wm7046 Date: 04/13/2004
The following testcase fails in JDK 1.3.1_11 only. It might be a regression.
import java.text.SimpleDateFormat;
import java.util.Date;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
sdf.setLenient(false);
Date d1 = sdf.parse("2004.04.02");
Date d2 = sdf.parse("2004.04.06");
System.out.println("A date value in PST zone:" + d1.toString());
System.out.println("A date value in PDT zone:" + d2.toString());
OR
@ To make the test complete:
@ .
@ SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
@ sdf2.setLenient(false);
@ String s1 = sdf2.format(d1);
@ String s2 = sdf2.format(d2);
@ System.out.println("Canonical version of d1:" + s1);
@ System.out.println("Canonical version of d2:" + s2);
@ .
@ Above test case will return "2004/04/02 00:00:00" for d1, and
@ "2004/04/06 01:00:00" for d2.
@ Ideally, both conversions should return 00:00:00 as the time component.
(Incident Review ID: 249946)
======================================================================
###@###.### 10/11/04 18:36 GMT
The following testcase fails in JDK 1.3.1_11 only. It might be a regression.
import java.text.SimpleDateFormat;
import java.util.Date;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
sdf.setLenient(false);
Date d1 = sdf.parse("2004.04.02");
Date d2 = sdf.parse("2004.04.06");
System.out.println("A date value in PST zone:" + d1.toString());
System.out.println("A date value in PDT zone:" + d2.toString());
OR
@ To make the test complete:
@ .
@ SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
@ sdf2.setLenient(false);
@ String s1 = sdf2.format(d1);
@ String s2 = sdf2.format(d2);
@ System.out.println("Canonical version of d1:" + s1);
@ System.out.println("Canonical version of d2:" + s2);
@ .
@ Above test case will return "2004/04/02 00:00:00" for d1, and
@ "2004/04/06 01:00:00" for d2.
@ Ideally, both conversions should return 00:00:00 as the time component.
(Incident Review ID: 249946)
======================================================================
###@###.### 10/11/04 18:36 GMT
- duplicates
-
JDK-5085519 REGRESSION in 1.3.1_11: SimpleDateFormat wrong parse behaviour
- Closed
-
JDK-5043409 JDK1.3.1_11 changed the default ERA in GregorianCalendar
- Closed
-
JDK-6231426 incorrect time on certain dates under the EST5EDT timezone
- Closed
- relates to
-
JDK-4953991 java.sql.TimeStamp results in wrong time for some timezones when dates are in BC
- Resolved