This is a generic JDK bug (well, it will also occur on Solaris - the behavior might be
different
on the Windows JDKs). The problem is to do with Java's broken Calendar classes and has
something
to do with your timezone. The behaviour will be different depending on what time zone
you are in
- in some timezones it works, in others it doesn't.
The problems are fixed in JDK 1.2
regards
[ bryce ]
Constantin Teodorescu wrote:
> Hello all,
>
> I have discovered a bug (?) in jdk 1.1.7-v1a-glibc
> I am running a RedHat 5.2 i386 Linux with 2.2.5 kernel on a K6II-350
> MHz/64 Mb RAM
>
> I am setting a new SimpleDateFormat with "yyyy-MM-dd" parsing format and
> I'm trying to parse and use some dates.
> Curiously, the ONLY date that doesn't work corectly is 1999-04-30 (ie
> April 30 in 1999).
>
> Any (29)30(31) of other months are working just fine!
>
> I am sending you also a small program to check and proove the error.
>
> The output of the program is :
>
> Parsing and testing the date of 1999 April 29
> The parsed day is Thu Apr 29 00:00:00 GMT+02:00 1999
> The date formatted as yyyy-MM-dd is 1999-04-29
>
> Parsing and testing the date of 1999 April 30
> The parsed day is Thu Apr 29 23:00:00 GMT+02:00 1999
> The date formatted as yyyy-MM-dd is 1999-04-29
>
> The above error doesn't exist when running the jdk 1.2 pre-release-v1 on
> the same system !!!
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]