Name: bsT130419 Date: 10/04/2001
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
java.sql.Date.toString() is broken
on all platforms & versions of the JRE.
If the Date falls in a year before 1000
or after 9999 then it produces an
incorrectly formatted String representation.
The specification of the String format
(and that expected by DB2 JDBC drivers for
example) is "yyyy-mm-dd". Unfortunately the
current implementation only works if the
year is >= 1000 and <= 9999.
The fix is extremely simple; line 124 of
java/sql/Date.java needs to pad the string
with leading zeros.
(Review ID: 133152)