Bug 114551 - Date format not stored properly in Calc
Summary: Date format not stored properly in Calc
Status: RESOLVED DUPLICATE of bug 113889
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2017-12-19 09:23 UTC by mitja
Modified: 2017-12-21 17:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:

Test file with date values, formatted DD.MM.YY and saved in LO 5.4.3 (6.50 KB, application/vnd.ms-excel)
2017-12-19 09:27 UTC, mitja

Note You need to log in before you can comment on or make changes to this bug.
Description mitja 2017-12-19 09:23:57 UTC
If Calc spreadsheet contains Date values, formatted eg. 'DD.MM.YY', then opening the same file in older versions of Libre Office or Excel shows Date values as 'MM.DD.YY'. So Day and Month figures are switched.

That happens every time the file is saved, even though values are not changed at all.
Only if the same file is opened in LibreOffice ver. 5.4.3 then date format looks ok.

Steps to Reproduce:
1. System and LO date format setting is DD.MM.YY
2. Store date value in a cell in format DD.MM.YY (or DD.MM.YYYY or DD.MM.YYYY HH:MM:SS)
3. Save file as ODS or XLS or XLSX.

Actual Results:  
If the file in opened in LO ver. < 5.4.0 or Excel the date value is in format MM.DD.YY.

Expected Results:
Date value should be always in format DD.MM.YY!

Reproducible: Always

User Profile Reset: No

Additional Info:
This bug appeared in Libre Office ver. 5.4.

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0
Comment 1 mitja 2017-12-19 09:27:35 UTC
Created attachment 138518 [details]
Test file with date values, formatted DD.MM.YY and saved in LO 5.4.3
Comment 2 Aron Budea 2017-12-21 05:24:33 UTC
I did notice some weirdness, but may I ask why you're specifying the order of date in the file? Normally it should be set to the standard order corresponding to your locale, and then when it's opened with a different locale, it'll show accordingly.
Comment 3 mitja 2017-12-21 08:08:52 UTC
The problem is that Libre Office version 5.4+ treats date format somehow differently.
According to my locale the date format is DD.MM.YYYY.
If I enter the date in spreadsheet in LO ver. 5.4+ it looks ok. And also recognized date format is ok.
But, if i open the same file on the same computer (with the same locale) with LO ver. 5.3 or lover (or with Open Office or with Neo Office or With Excel), then the date format should be the same! But it isn't. Date is shown as MM.DD.YYYY.

In other words date eg. 21.12.2017 (21st December 2017) is shown as 12.21.2017. And this is incorrect!

Obviously, I assume, LO 5.4 stores something in the file regarding dates, that all other spreadsheet programs (including LO ver. <= 5.3) understands differently. And in incorrect way.

Aron, must admit that I don't quite understand your point, actually!?
Namely, if I set the date format as DD.MM.YYYY (especially explicitly) it should stay that way, and not show as MM.DD.YYYY if the file is opened in another program or another LO version except 5.4.
This is the same as eg. I format the text in LO Writer as bold, but in Word (or other LO version) the text is shown as italic!

So, to me it looks like it is a bug that appeared in LO ver. 5.4.0. I checked all versions from 5.3.7 till 5.4.3. And all versions from 5.4.0 till 5.4.3 have this bug.
Comment 4 Aron Budea 2017-12-21 17:51:22 UTC
It seems to be duplicate of bug 113889, and should be fixed in LO 5.4.4, which was released a few days ago.

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