Bug 127530 - Calc does not reapply DD-MMM-YY date formatting when modifying date values (en-US locale affected?)
Summary: Calc does not reapply DD-MMM-YY date formatting when modifying date values (...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.7.1 release
Hardware: All Windows (All)
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-13 01:02 UTC by jmliles4290
Modified: 2021-08-20 17:00 UTC (History)
5 users (show)

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


Attachments
Video of behavior (4.32 MB, video/mp4)
2019-09-13 11:53 UTC, jmliles4290
Details
Spreadsheet used in example video (8.09 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-09-13 11:54 UTC, jmliles4290
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jmliles4290 2019-09-13 01:02:10 UTC
Description:
This problem began around Calc version 6.2.7. Using cell date format DD-MMM-YY, you can type "12 sep 19" and Calc will correctly recognize the date and display it as "12-Sep-19" with the underlying date data of 09/12/2019, but this fails in some instances. Specifically, if the cell already contains a date in this format and you attempt to type over it, Calc will remove the date formatting and not reapply it unless the date is typed exactly (including the dashes). In order to modify a date in a cell with this formatting, you either have to delete the cell contents first, or type the new date twice (typing it the first time removes the formatting, and typing it a second time recognizes the date correctly).

Steps to Reproduce:
1. Select a cell and change the formatting to Date, DD-MMM-YY
2. In that cell, type "12 sep 19". The cell should display a date value of "12-Sep-19".
3. Type over the existing text with "12 sep 19". The date formatting will be removed and the cell value will change to '12 sep 19 (this is the bug)
4. Type over the text again with "12 sep 19". The date formatting will be correctly reapplied and the cell should again correctly display a date value of "12-Sep-19".

Actual Results:
In step 3, the date formatting will be removed and the cell value will change to '12 sep 19 (this is the bug)

Expected Results:
Step 3 should perform the same as step 4.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 Timur 2019-09-13 10:35:39 UTC
I don't reproduce with LO 6.2.7 in Windows.
Please test with master that will be installed separately: https://dev-builds.libreoffice.org/daily/master/
And please attach screencast.
Comment 2 m.a.riosv 2019-09-13 10:57:09 UTC
Can't repro
Version: 6.2.7.1 (x64)
Build ID: 23edc44b61b830b7d749943e020e96f5a7df63bf
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: es-ES (es_ES); UI-Language: en-US Calc: threaded
Version: 6.3.3.0.0+ (x64)
Build ID: c5b79cd7fd0f6f34d2275d659eb3fc763fc363db
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:libreoffice-6-3, Time: 2019-09-12_10:18:36
Locale: es-ES (es_ES); UI-Language: en-US Calc: CL

And please attach a file where you have the issue, as simple as possible.
Comment 3 jmliles4290 2019-09-13 11:53:50 UTC
Created attachment 154153 [details]
Video of behavior
Comment 4 jmliles4290 2019-09-13 11:54:48 UTC
Created attachment 154154 [details]
Spreadsheet used in example video
Comment 5 jmliles4290 2019-09-13 11:59:56 UTC
Reproduced in separate install of master (https://dev-builds.libreoffice.org/daily/master/Win-x86_64@42/2019-09-13_00.47.47/). Also reproduced on separate Windows machines running 6.2.7 and 6.3.1. Added video of behavior and file used in video.
Comment 6 Oliver Brinzing 2019-09-13 13:40:57 UTC
maybe related to/a regression from:

Bug 126116 - Displayed form of date changes to dd-mm-yyyy when date is changed in cell with format dd-mm-yy
Comment 7 m.a.riosv 2019-09-13 14:46:40 UTC
I can repro with sample file.
Version: 6.3.3.0.0+ (x64)
Build ID: c5b79cd7fd0f6f34d2275d659eb3fc763fc363db
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:libreoffice-6-3, Time: 2019-09-12_10:18:36
Locale: es-ES (es_ES); UI-Language: en-US Calc: CL

Maybe the locale affects this behavior.
Please copy here the Menu/Help/About information.
Comment 8 jmliles4290 2019-09-13 14:58:30 UTC
From both machines reproduced on:

#1
Version: 6.3.1.2 (x64)
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL

#2
Version: 6.2.7.1 (x64)
Build ID: 23edc44b61b830b7d749943e020e96f5a7df63bf
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 9 jmliles4290 2019-09-13 15:05:07 UTC
Changed locale to es-ES and the behavior no longer happens... date values were updated to be stored day-first instead of month-first, if that's a factor.
Comment 10 Timur 2019-09-13 15:09:58 UTC
@m.a.riosv should you confirm? I updated the title. Feel free to improve.
Comment 11 jmliles4290 2019-09-13 15:37:35 UTC
I'll leave the exact title to you experts, but I don't think it should reference "specific file", as it seems to apply to all files using my locale.
Comment 12 m.a.riosv 2019-09-13 23:20:47 UTC
Verified it happens to me with en-US as locale but not with es-ES.

I'm not sure what kind of bug, because with en-US introducing 'Sep 12 19' doesn't show the issue. So it's really strange a wrong date for en-US that once work and the next not.
Comment 13 Timur 2019-09-16 08:34:46 UTC
I do not reproduce even if switched to en-US locale, new or attached file.
Comment 14 Xisco Faulí 2019-09-17 13:42:49 UTC
I can't reproduce it in

Version: 6.4.0.0.alpha0+
Build ID: c56bf1479cc71d1a2b0639f6383e90c1f7e3655b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-GB (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

Notice i'm using en-US language

@Eike, can you reproduce this on your end ?
Comment 15 jmliles4290 2019-09-17 19:14:22 UTC
If anyone else can confirm, I believe this bug is linked to the language selected for the individual cell in the Format Cells dialogue. This setting is, by default, linked to locale but is independently changeable and appears to affect this behavior. 

Changing the cell language changes the cell data to match the country's date format (e.g., day-month-year versus month-day-year), and this behavior seems to appear using a language associated with a country that uses month-day-year dates (mainly the United States...).

I can reproduce with English (USA) and English (Philippines). Using a different language, English (UK) for example, does not show this behavior.

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 06925c1230cd6269fa5189ac3f4d608c9edf68e9
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-09-17_00:45:28
Locale: en-US (en_US); UI-Language: en-US
Calc: CL