------- 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

Reply via email to