Bug 19792

Summary: Setting Cell's value to Jan 1, 1900 without a time doesn't return the same value set to
Product: POI Reporter: Donald Bell <donald>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 3.0-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: JUnit that shows bug.

Description Donald Bell 2003-05-09 05:23:52 UTC
When setting a cell's value to Jan 1, 1990 without a time the returned value 
doesn't return the doesn't return the same date.  It returns a date one date 
later on Jan 2, 1990.

Calendar cal = Calendar.getInstance();
		
// A pseduo special Excel dates
cal.set(1900, 0, 1);
	
Date valueToTest = cal.getTime();
		
HSSFCell cell = getNewCell();
		
cell.setCellValue(valueToTest);
Comment 1 Donald Bell 2003-05-09 05:24:42 UTC
Created attachment 6292 [details]
JUnit that shows bug.
Comment 2 Danny Mui 2003-05-09 15:52:40 UTC
good stuff with the unit tests..ill look at this soon (tm).
Comment 3 Paul Krause 2003-06-04 17:18:05 UTC
Excel handles (incorrectly) the year 1900 as a leap year, so the serial numbers 
from January 1 to March 1 of that year may be off by one.
Comment 4 Andy Oliver 2003-07-24 16:31:16 UTC
Should be looked out...sounds like an Excel bug....  REgardless its not serious
enough to hold up 2.0
Comment 5 Tom 2005-12-16 09:29:50 UTC
The Summary and initial description stated 1990 was the issue, but the unit 
test and subsequent comments show the problem as being with the year 1900. 
Changed the summary to reflect that that it is an issue with 1900 not 1990.
Comment 6 Yegor Kozlov 2008-12-25 10:27:37 UTC
The latest POI 3.5-beta4 works properly. 

Yegor