Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Thought I'd raise this since I spotted it while looking at another problem and it might easily be overlooked. The following test code outputs:
date = 'Wed Jan 01 00:00:00 GMT 21'
date = 'Sun Jan 01 00:00:00 GMT 321'
on a 5.0 RI but Harmony still outputs the 1.4 RI version:
date = 'Wed Jan 01 00:00:00 GMT 0021'
date = 'Sun Jan 01 00:00:00 GMT 0321'
import java.util.Calendar;
import java.util.Locale;
public class Test {
public static void main(String[] args)
{ Locale.setDefault(new Locale("en_GB")); Calendar c = Calendar.getInstance(); c.clear(); c.set(Calendar.YEAR, 21); System.out.println("date = '"+c.getTime()+"'"); c.set(Calendar.YEAR, 321); System.out.println("date = '"+c.getTime()+"'"); }
}