DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39472>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39472

           Summary: Wrong behaviour when setting cell value to dates between
                    1900-01-01 and 1900-02-28
           Product: POI
           Version: 2.5
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Try to set a cell value using the HSSFCell.setCellValue(java.util.Date) to a
date that is between 1900-01-01 and 1900-02-27, you'll get a value with a +1
than the correct one.

All dates between 1900-01-01 and 1900-01-27 get shifted with a +1.

>From day 61 onwards (1900-03-01) the problem doesn't appear due to an Excel
strange behaviour: it seems to consider 1900 as a lap year (while it isn't), so
it diplay day 60 as 29/02/1900. So the two problems compensate each other.

Ex.
getExcelDate(1900-01-01) --> 2  (excel display as Jan 1, 1900)
getExcelDate(1900-01-02) --> 3  (excel display as Jan 2, 1900)
getExcelDate(1900-01-03) --> 4  (excel display as Jan 3, 1900)
...
getExcelDate(1900-02-27) --> 59 (excel display as Feb 28, 1900)
getExcelDate(1900-02-28) --> 60 (excel display as Feb 29, 1900!!)
getExcelDate(1900-03-01) --> 61 (excel display as Mar 03, 1900)

A fix should take into account the excel problem without breaking the first two
months.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/

Reply via email to