Download it now!
Bug 108588 - FILEOPEN: XLSX - Incorrect cell date formatting when locale is en-GB
Summary: FILEOPEN: XLSX - Incorrect cell date formatting when locale is en-GB
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: Number-Format XLSX
  Show dependency treegraph
 
Reported: 2017-06-17 14:06 UTC by Kees van den Broek
Modified: 2018-03-13 23:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of LibreOffice Calc with cell properties. (179.33 KB, image/png)
2017-06-17 14:06 UTC, Kees van den Broek
Details
The untouched xlsx to reproduce the issue (25.94 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-06-17 14:07 UTC, Kees van den Broek
Details
Opened the same xlsx on a different machine, with a different locale. (172.85 KB, image/png)
2017-06-19 07:50 UTC, Kees van den Broek
Details
Safe mode, still no success (97.76 KB, image/png)
2017-06-19 11:09 UTC, Kees van den Broek
Details
'Faulty machine' about dialog (139.80 KB, image/png)
2017-06-19 11:10 UTC, Kees van den Broek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kees van den Broek 2017-06-17 14:06:33 UTC
Created attachment 134081 [details]
Screenshot of LibreOffice Calc with cell properties.

I received this xlsx spreadsheet.
When selecting cell B3, the value shows as: 03/10/5777. That's not expected. However, looking up on the data entry bar, it shows 01/01/2017: that's a value I did expected.
I opened cell format properties. Seems the format code is DD/MM/EE. I didn't touch any of this, so my guess is that the xlsx import filter isn't working as expected.
I didn't verify this as I don't have Microsoft Excel, but I assume the author of this spreadsheet sees a 4 digit year, not a 2 digit era.
Comment 1 Kees van den Broek 2017-06-17 14:07:15 UTC
Created attachment 134082 [details]
The untouched xlsx to reproduce the issue
Comment 2 Xavier Van Wijmeersch 2017-06-18 07:11:18 UTC
i did safe the xlxs in ods format and can't reproduce the behavior

Version: 6.0.0.0.alpha0+
Build ID: 2404a17e157273430d40ceaa1ab1275e7b50ba6e
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-06-17_03:43:01
Locale: nl-BE (en_US.UTF-8); Calc: group

nor with

Version: 5.4.0.0.beta2+
Build ID: f540a8031e84e9da7fc9aa08522360dbb365b035
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-4, Time: 2017-06-17_01:11:05
Locale: nl-BE (en_US.UTF-8); Calc: group

os Slackware64 current
Comment 3 Kees van den Broek 2017-06-19 07:49:02 UTC
I opened the xlsx on another machine. There it did work as expected:

Version: 5.3.1.2
Build ID: 1:5.3.1-0ubuntu2
CPU Threads: 4; OS Version: Linux 4.10; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: nl-NL (en_GB.UTF-8); Calc: group

I expect the difference to be in the locale.
I can verify this when I get back to the machine I reported the issue on.
Comment 4 Kees van den Broek 2017-06-19 07:50:05 UTC
Created attachment 134125 [details]
Opened the same xlsx on a different machine, with a different locale.
Comment 5 Xisco Faulí 2017-06-19 10:43:53 UTC Comment hidden (obsolete)
Comment 6 Kees van den Broek 2017-06-19 11:09:09 UTC
I'm in safe mode and also chose to reset the profile.
Still the machine that I had problems on initially continues to give problems.
I'll add the screenshot of the 'safe-mode' proof, and I'll provide a screenshot of the LO build details.
Comment 7 Kees van den Broek 2017-06-19 11:09:28 UTC
Created attachment 134131 [details]
Safe mode, still no success
Comment 8 Kees van den Broek 2017-06-19 11:10:07 UTC
Created attachment 134132 [details]
'Faulty machine' about dialog
Comment 9 Buovjaga 2017-06-27 16:43:31 UTC
Repro, after I changed locale to Eng. (UK) from Tools - Options - Language settings - Languages

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: f808c50c6eece87d515df3b84b1c774395b5d9bc
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: en-GB (fi_FI.UTF-8); Calc: group
Built on June 26th 2017
Comment 10 Eike Rathke 2018-03-13 23:08:28 UTC
The date format in the .xlsx file is

    <numFmt numFmtId="164" formatCode="dd/mm/ee"/>

An EE year format switches to the secondary calendar defined for a locale, which for nl-NL is none so still Gregorian calendar is displayed, but en-GB inherits the Jewish calendar from en-US, so displays 5777 instead of 2017.

Not a bug.