Bug 116572 - FILESAVE dates written to .xlsx are off by one
Summary: FILESAVE dates written to .xlsx are off by one
Status: RESOLVED DUPLICATE of bug 44453
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.3.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-22 19:31 UTC by pr.nienhuis
Modified: 2018-03-24 23:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pr.nienhuis 2018-03-22 19:31:46 UTC
Writing dates 31/12/1899 and 1/1/1900 (European nation, DMY format) into an .xlsx is read by MS-Excel 2013 as 1/1/1900 and 2/1/1900. So it looks LibreOffice is off-by-one there.
(Yes the first date is out of Excel's epoch, but the second is OK.)

Noted & confirmed in passing here in an Octave bug report:
https://savannah.gnu.org/bugs/index.php?53401
Comment 1 m_a_riosv 2018-03-22 22:26:41 UTC
Pls test your option in Menu/Tools/Options/LibreOffice calc/Calculate - Date
Comment 2 pr.nienhuis 2018-03-22 22:55:48 UTC
That's set to 12/30/1899.
Given Excel's expectations I'd think it would rather be 12/31/1899 but that choice isn't there.
Comment 3 pr.nienhuis 2018-03-23 07:49:57 UTC
I just checked to be sure, Excel has 31/12/1899 for a date value of 0 (zero).
For dates, Excel (-2013 at least) has just its standard setting (above) or "Use 1904 date system".
I'd think it is reasonable to expect LibreOffice to save to one of those date systems when writing to .xlsx files (and probably also to .xls files).
Comment 4 Aron Budea 2018-03-24 23:37:54 UTC
Seems to be the same as bug 44453.

*** This bug has been marked as a duplicate of bug 44453 ***