JDK-6992200 : (cal) BUG in Calendar
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2010-10-14
  • Updated: 2012-03-20
  • Resolved: 2011-03-11
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :


ADDITIONAL OS VERSION INFORMATION :
Linux/Ubuntu 8.10 - released in October 2008.
				

A DESCRIPTION OF THE PROBLEM :
For this date Sat Oct 16 00:00:00 BRT 3910 when I make the

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the code of the description field and run it.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
dateValue.getTime() = Sat Oct 16 00:00:00 BRT 3910


ACTUAL -
dateValue.getTime()Sat Oct 15 23:00:00 BRT 3910


Just for this date has the problem.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.util.Calendar;
import java.util.Date;

public class bugReport{
public static void main(String [ ] args)
{

	Calendar dateValue = Calendar.getInstance();
			
	dateValue.set(3910,
	    	      10 - 1, //October
	      	      16,
	    	       0,
	    	       0,
	    	       0);
	    		
	System.out.println("dateValue" + dateValue);
	System.out.println("dateValue.getTime()" + dateValue.getTime());
	System.out.println("dateValue.getTimeInMillis()" + dateValue.getTimeInMillis());

}
}
---------- END SOURCE ----------

SUPPORT :
YES

Comments
EVALUATION Duplicate of 6772689 which was fixed in JDK7.
11-03-2011