From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20893 invoked by alias); 22 Jan 2005 03:29:56 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20744 invoked by uid 48); 22 Jan 2005 03:29:51 -0000 Date: Sat, 22 Jan 2005 03:29:00 -0000 Message-ID: <20050122032951.20743.qmail@sourceware.org> From: "gnu_andrew at member dot fsf dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030604052449.11085.cduffy@spamcop.net> References: <20030604052449.11085.cduffy@spamcop.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libgcj/11085] SimpleDateFormat fails to parse valid dates X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg03145.txt.bz2 List-Id: ------- Additional Comments From gnu_andrew at member dot fsf dot org 2005-01-22 03:29 ------- In current Classpath CVS head, parsing of this string is now successful. The output of the given test case is: $ java TestParse Result: Wed Jun 04 03:09:35 2003 Fail "Fail" is printed because the value doesn't match the given string. But, this string is the time localized to the timezone of where the class is being run. Sun outputs this localized String, while, at present, the Classpath one is always in GMT. It is clear that the above figure is the time 22:09:35 -0500 shifted five hours forward to GMT. Sun's VM (1.5) also fails the second bit, as it produces the localized output "Wed Jun 04 04:09:35 BST 2003" (being run on a machine in the UK). Comparing the numeric millisecond values is more accurate, and this shows equivalent values (1054696175000) for both VMs, and a mental grasp of the date/time shows that the output is correct. The only possible bug remaining here is that the Date.toString() output is incorrect, as it does not use the timezone field. Whether this is truly a bug or not is open to debate, as there appears to be no documentation on this in java.util.Date other than the requirement for a zzz field. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11085