Bug 14375

Summary: [PATCH] Fix for reading files that use 1904 date windowing
Product: POI Reporter: Dan Sherman <dsherman>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: Handle both 1900 and 1904 date windowing - patches to Workbook, HSSFCell, and HSSFDateUtil

Description Dan Sherman 2002-11-07 23:23:08 UTC
Files created in Excel for Macintosh, by default, save workbooks with all date cell values 
using 1904 date windowing.  HSSFDateUtil assumes 1900 windowing, thus converts 
these dates incorrectly.  Patch includes changes to Workbook.java, HSSFCell.java, and 
HSSFDateUtil.java to correctly identify whether 1900 or 1904 windowing is being used 
and do the correct conversion.  Also adds some additional internal date formats to 
HSSFDateUtil.isInternalDateFormat(int).
Comment 1 Dan Sherman 2002-11-07 23:25:33 UTC
Created attachment 3769 [details]
Handle both 1900 and 1904 date windowing - patches to Workbook, HSSFCell, and HSSFDateUtil
Comment 2 Andy Oliver 2002-11-28 19:34:21 UTC
Done, applied.  You know if we had a unit test for it, then we might not break
it later..  (So far just about EVERY thing that doesn't have a unit test has
been broken from time to time...the unit tested code has stayed clean!)
Comment 3 Avik Sengupta 2004-01-01 08:58:36 UTC
Reverted the internal date format addition, since they caused 24125. 
Tho only 0xaa and 0xac have been reported incorrect, have reverted the whole set
(0xa4 to 0xad) since we cant now say which ones are suspect! 
Comment 4 Avik Sengupta 2004-01-01 09:01:49 UTC
even a7-ab has been reported to be percentage formats.. so best to keep the
whole set out.