Bug 127241 - Date format not saved and read properly
Summary: Date format not saved and read properly
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.2 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Cells
  Show dependency treegraph
 
Reported: 2019-08-30 12:46 UTC by TorrAB
Modified: 2023-10-03 19:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
file with date (15.36 KB, application/vnd.oasis.opendocument.text)
2019-08-30 12:46 UTC, TorrAB
Details
file with date (15.36 KB, application/vnd.oasis.opendocument.text)
2019-08-30 21:51 UTC, TorrAB
Details
screenshot showing mm/dd/yyyy (11.14 KB, image/png)
2019-08-30 21:54 UTC, TorrAB
Details
screenshot showing new format yyyy-mm-dd, before saving (11.55 KB, image/png)
2019-08-30 21:57 UTC, TorrAB
Details
screenshot showing old format mm/dd/yyyy after re-loading (11.59 KB, image/png)
2019-08-30 22:00 UTC, TorrAB
Details
screenshot with old date format restored (26.30 KB, image/png)
2019-09-04 00:50 UTC, TorrAB
Details
file with date mm/dd/yyyy (15.37 KB, application/vnd.oasis.opendocument.text)
2019-09-05 02:18 UTC, TorrAB
Details
file as loaded: mm/dd/yyyy (10.50 KB, image/png)
2019-09-07 23:57 UTC, TorrAB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TorrAB 2019-08-30 12:46:22 UTC
Created attachment 153754 [details]
file with date

open dateCh.odt; the date is in the format mm/dd/yyyy; double click it, choose the format yyyy-mm-dd, save and close the file.
Reopen it: the old format is back!
Comment 1 Mike Kaganski 2019-08-30 13:00:36 UTC
Cannot reproduce with Version: 6.3.1.1 (x64)
Build ID: e979878b49a48dab15ebe528f238b88125e32c65
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

Attachment 153754 [details] opens with the date field in the header formatted yyyy-mm-dd from the start; changing it to mm/dd/yyyy; saving and reloading; changing back to yyyy-mm-dd; saving and reloading work as expected.
Comment 2 TorrAB 2019-08-30 21:51:50 UTC
Created attachment 153767 [details]
file with date
Comment 3 TorrAB 2019-08-30 21:54:14 UTC
Created attachment 153768 [details]
screenshot showing mm/dd/yyyy
Comment 4 TorrAB 2019-08-30 21:57:48 UTC
Created attachment 153769 [details]
screenshot showing new format yyyy-mm-dd, before saving
Comment 5 TorrAB 2019-08-30 22:00:19 UTC
Created attachment 153770 [details]
screenshot showing old format mm/dd/yyyy after re-loading
Comment 6 Mike Kaganski 2019-08-30 22:06:46 UTC Comment hidden (obsolete)
Comment 7 TorrAB 2019-08-31 20:53:58 UTC Comment hidden (obsolete)
Comment 8 Mike Kaganski 2019-08-31 21:26:51 UTC Comment hidden (obsolete)
Comment 9 raal 2019-09-03 21:49:53 UTC
Works for me in Version: 6.4.0.0.alpha0+
Build ID: 41cd3e8e817c8c33a13608e62eeb06ce2c6977e4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 

format is  yyyy-mm-dd when I open the file
Comment 10 TorrAB 2019-09-04 00:50:35 UTC
Created attachment 153851 [details]
screenshot with old date format restored
Comment 11 Dieter 2019-09-04 20:27:27 UTC
(In reply to TorrAB from comment #2)
> Created attachment 153767 [details]
> file with date

Date in file has format yyyy-mm-dd, so it's not possible to folow the steps from bug report. Please attach a document with date format mm/dd/yyyy

=> NEEDINFO
Comment 12 TorrAB 2019-09-05 02:18:07 UTC
Created attachment 153888 [details]
file with date mm/dd/yyyy

The behaviour is the same whether the date is 'fixed' or not.
Comment 13 QA Administrators 2019-09-05 09:35:20 UTC Comment hidden (obsolete)
Comment 14 Dieter 2019-09-06 06:21:35 UTC
(In reply to TorrAB from comment #12)
> Created attachment 153888 [details]
> file with date mm/dd/yyyy

If I open file it has format yyyy-mm-dd (Please check this). I changed format to mm/dd/yyyy and followed your steps from your original bug report, but couldn't reproduce it.

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 01837a85004a6f891a09c0a63ed7eff75d634827
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-01_00:07:05
Locale: en-GB (de_DE); UI-Language: en-US
Calc: threaded
Comment 15 Mike Kaganski 2019-09-06 06:29:41 UTC
The user obviously sees the document as "mm/dd/yyyy", despite it being formatted as "yyyy-mm-dd"; that's why user keeps sending us the file as if it's "mm/dd/yyyy".

The problem is that it looks like some local issue that is not reproducing on other systems.

OP: did you try resetting user profile / starting in safe mode [1] ?

[1] https://wiki.documentfoundation.org/UserProfile
Comment 16 Timur 2019-09-06 14:56:24 UTC
TorrAB, please do as advised and check your own date/regional settings. 
We all open the file with yyyy-mm-dd. 
So it's up to you to find the cause. Until then, I set to Needinfo.
Comment 17 TorrAB 2019-09-07 23:57:28 UTC
Created attachment 154010 [details]
file as loaded: mm/dd/yyyy
Comment 18 QA Administrators 2019-09-08 05:03:23 UTC Comment hidden (obsolete)
Comment 19 Dieter 2019-09-08 12:33:13 UTC
(In reply to Mike Kaganski from comment #15)
> The problem is that it looks like some local issue that is not reproducing
> on other systems.

TorrAB, please past infos from Help => About LibreOffice

=> NEEDINFO
Comment 20 Mike Kaganski 2019-09-08 19:08:47 UTC
In a similar https://ask.libreoffice.org/en/question/207904/writer-date-in-footer-always-resetting-to-mmddyy/?comment=207942#post-id-207942, it was suggested that setting labguage to something different than "automatic" might help - is that the case here, too?
Comment 21 TorrAB 2019-09-08 23:56:29 UTC
(In reply to Mike Kaganski from comment #20)
> In a similar
> https://ask.libreoffice.org/en/question/207904/writer-date-in-footer-always-
> resetting-to-mmddyy/?comment=207942#post-id-207942, it was suggested that
> setting labguage to something different than "automatic" might help - is
> that the case here, too?

'Check whether Language specification turned to Automatic after you have specified your format for page 2. I do also see what you describe and could overcome the behavior by (re-)specifying the format under Additional formats and -important- setting Language different to Automatic'
 —where is 'Additional formats'?
Comment 22 QA Administrators 2019-09-09 05:31:25 UTC Comment hidden (obsolete)
Comment 23 TorrAB 2019-09-11 02:24:29 UTC
(In reply to Mike Kaganski from comment #20)
> In a similar
> https://ask.libreoffice.org/en/question/207904/writer-date-in-footer-always-
> resetting-to-mmddyy/?comment=207942#post-id-207942, it was suggested that
> setting labguage to something different than "automatic" might help - is
> that the case here, too?

Good suggestion!

Edit a date field; under 'Format', click 'Additional formats'; open the 'Language' menu, click the last item, Zulu (or Lithuanian, Ndebele, Swedish, Tsonga, Tswana, Xhosa, …): format becomes yyyy-mm-dd. Save the file, reload it: the format is still yyyy-mm-dd. Victory! But the procedure is bizarre and tricky…
Comment 24 Mike Kaganski 2019-09-11 07:43:23 UTC
I don't think it is resolved; we only found some kind of workaround, and haven't yet decided if the situation is OK or is a bug (personally I think it's a bug, because for some people, it works, and some need explicit settings - not ideal).

Please share your locale and other detail from Help->About. We need to find out how to reproduce on systems where it worked OK.
Comment 25 Alex Doll 2020-09-15 15:43:24 UTC
I am seeing the same issue, except with 7.0.1.2 on OpenSuse Tumbleweed.  The data keeps reverting to the EN-CA default format (DD/MM/YY) even after I set it to the ISO format YYYY-MM-DD.  Every time the file reopens, the data field in the footer is back to the DD/MM/YY format.

I have to change it twice, once for the first page (the page style is different for the first page of the document) then also for any of the subsequent pages (and it then propagates).
Comment 26 Fritz R. Paul 2020-09-29 10:02:30 UTC
We (me and a bunch of colleagues) experience a similar behaviour. We are using different LO versions with different default languages. For certain complex documents, the problem is not only affecting dates, but also other user defined formats. Maybe there is more than one issue. Here is what we found so far:
It looks as if the documents are stored correctly. When opening them, they first look fine. But then (even after loading and before activating it), the formats change. It looks as if default formats would be used instead.
This behaviour seems to be related to the automatic page numbering. If the page number (page x from y) is removed in the page formats, the effect is gone.
Could it be that there is code to fix page numbers, which as a side effect, changes the formats?
Comment 27 TorrAB 2020-10-03 01:11:05 UTC
I have had no problem since I changed the language to English (Canada)
Calc: Tools>Options>LanguageSettings>LocaleSetting: English (Canada)
Try ^; in a cell
Writer: ^F2, Fields>Date>Format, AdditionalFormats>English (Canada)