Issue 117900 - Writer changes date fields formatted YYYY-MM-DD to DD/MM/YYYY when English (Canada) locale enabled
Summary: Writer changes date fields formatted YYYY-MM-DD to DD/MM/YYYY when English (C...
Status: CLOSED WONT_FIX
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: OOo 3.3
Hardware: PC Other OS
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 00:06 UTC by nick.gunz
Modified: 2017-05-20 10:11 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
This file has dates represented in a number of different formats. (9.93 KB, application/vnd.oasis.opendocument.text)
2011-04-21 00:06 UTC, nick.gunz
no flags Details
This has been opened, edited (without manually changing the date formats) and resaved under the English (Canada) locale (9.40 KB, application/vnd.oasis.opendocument.text)
2011-04-21 00:10 UTC, nick.gunz
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description nick.gunz 2011-04-21 00:06:06 UTC
Created attachment 76419 [details]
This file has dates represented in a number of different formats.

When a date field is created and formatted in ISO 8601 format (YYYY-MM-DD) in a Writer (ODT) file it displays correctly.  However, if the file is opened in Writer with the English (Canada) locale enabled, it incorrectly displays as DD/MM/YYYY.

If this file is changed, and re-saved while the English (Canada) locale is enabled, the date format is permanently changed to DD/MM/YYYY.

How to Recreate:

1. Open an ODT file.
2. Insert > Fields > Date
3. Double-click on newly created field.
4. Select YYYY-MM-DD format
5. Close file
6. Re-open file in OpenOffice with with English (Canada) locale enabled.

Expected behaviour:

Date field should still be in YYYY-MM-DD format.

Actual behaviour:

Date field is now in DD/MM/YYYY format.

Notes:

- This problem does not occur when English (UK) locale is enabled.
- The problem occurs under both Windows 7 and Ubuntu Linux
- This may or may not be related to the recent change in default date format for the English (Canada) locale from DD/MM/YY to YYYY-MM-DD (see bug ____)
Comment 1 nick.gunz 2011-04-21 00:10:14 UTC
Created attachment 76420 [details]
This has been opened, edited (without manually changing the date formats) and resaved under the English (Canada) locale
Comment 2 nick.gunz 2011-04-21 00:11:54 UTC
Sorry, I accidentally left off some important information:

The bug referred to above, in which the default date format for English (Canada) was changed, is Bug 106992.

This problem does not seem to occur with other date formats that I have tried.
Comment 3 quicky 2011-06-06 18:18:27 UTC
Same in German (Germany)
all dots (.) change to slashes (/) when reopened (saved in .doc word97...)

e.g.
6. Jun. 2011

Automatically set to:

6/ Jun/ 2011
Comment 4 Oliver-Rainer Wittmann 2012-06-13 12:24:57 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.
Comment 5 spolise1 2012-09-29 23:07:35 UTC
I successfully replicated the above mentioned bug on a windows 7 pc
and i followed some simple steps to do so
1)open a new open office text document(it has an .ODT extension)
2)now, in this document click on insert>fields>date
3)now click on date field and change the format to YYYY-MM-DD (1991-12-31 is shown in the options select it).
4)save and close the file.
5)now click on the open office shortcut.then click Tools>options>Language settings>Languages and then change the locale setting to "English(canada)".
6)now open the previously edited document.then we find its contents in DD/MM/YYYY format(contradicting the expected format of YYYY-MM-DD).

Additional Information:
the contents in the file remained the same when the locale setting is changed to Hindi,Telugu,German,etc..
Comment 6 Colin Dunklau 2013-02-18 19:21:57 UTC
I've also reproduced this issue on Mac OS 10.8.2 with OOo 3.4.1, using the same steps as the previous commenter. Oddly enough, when I change the OOo locale to English (Canada) and open a test document, I get MM/DD/YYYY... my computer's locale is set to USA, but I've changed the short date format to YYYY-MM-DD.

My colleague in Canada can reproduce this issue on his Mac 10.8 machine with the same file I used, but he gets DD/MM/YYYY.

This is incredibly frustrating since my department exchanges documents between our 
Canadian and USA offices regularly, and we have to change the date format to be consistent every time. Thankfully others were able to isolate this issue so we could work around it by changing the Canadian employees' OOo config to use the USA locale, but this is a shoddy workaround at best.

I'm going to try digging into the code, but I'm not confident I'll be able to find the cause in a reasonable time.

(In reply to comment #5)
> I successfully replicated the above mentioned bug on a windows 7 pc
> and i followed some simple steps to do so
> 1)open a new open office text document(it has an .ODT extension)
> 2)now, in this document click on insert>fields>date
> 3)now click on date field and change the format to YYYY-MM-DD (1991-12-31 is
> shown in the options select it).
> 4)save and close the file.
> 5)now click on the open office shortcut.then click Tools>options>Language
> settings>Languages and then change the locale setting to "English(canada)".
> 6)now open the previously edited document.then we find its contents in
> DD/MM/YYYY format(contradicting the expected format of YYYY-MM-DD).
> 
> Additional Information:
> the contents in the file remained the same when the locale setting is
> changed to Hindi,Telugu,German,etc..
Comment 7 Sandeep Kumar 2013-10-12 06:34:41 UTC
I have been successfully replicated the bug in Open Office 4.0.1 in Windows 8 configuration.  The following are the different steps that have been carried out in replicating a bug.
1.Open an Open Office document  and click on  Insert->Fields->Date.
2.Click on the date field in the document and change the format of the date to YYYY-MM-DD(1999-12-31) as shown in the 'Format' list.
3. Save and close the file.
4.   Now Open any new  Open Office document and  go to Tools>Options>Language settings>Languages and then change the locale setting to "English(Canada)".

5. Now open the file which have been saved in the above step, then we can find the contents of the date have been modified from YYYY-MM-DD(2013-10-11) to DD-MM-YYYY(11-10-2013) format which is an unexpected bug.
Comment 8 kelleybp 2013-11-15 01:52:34 UTC
I was able to replicate this bug on my Windows 7 64 bit PC, using version 4.0.1, build 9714.  
My steps were to:

1. Open a file
2. Enter the current date using Insert -> Fields -> Date
3. Save and close file
4. Open new file
5. Tools -> Options -> Language Settings -> Languages -> Locale Setting
6. Choose English(Canada)
7. Open saved file

The date will have been changed from the form YYYY-DD-MM to DD-MM-YYYY.
Comment 9 MRodgers 2014-06-05 11:58:08 UTC
Mary Rodgers has taken this bug
Comment 10 Roberta Vasek 2014-06-18 02:08:37 UTC
The replication of this bug in different OOo versions/machines (3.3/PC Other, 3.4.1/Mac OS 10.8.2, 4.0.01/Windows 7 & 8) is documented and I'm able to replicate in AOO401m5(Build:9714) on Windows 7 as well.

Steps used to recreate...
1.	Open a new ODT document with all language settings as English (USA).
2.	Insert > Fields > Date
3.	Double click on date field that step above created in document
4.	Select Format as YYYY-MM-DD format (current listing shows 1999-12-31).  Selections on this window for Type defaults to Date and for Select defaults to Date (fixed).
5.	Save and close document.  Date appears as 2014-06-15 at this point.
6.	Change language settings as follows before opening saved document.
7.	Tools > Options > Language Settings > Languages and change Locale setting only to English (Canada)
8.	Open document and date now appears as 06/15/2014
 
As noted in later entries for this bug, I did not see a change in the date format when other locale options were selected:  German, Hindi, etc., but I do notice the same date format change from YYYY-MM-DD to MM/DD/YYYY when going from English (USA) to French (Canada).  Please include this scenario as well when looking into a correction for the English (Canada) situation.
Comment 11 mroe 2014-08-18 06:13:41 UTC
Issue 30216 - Ability to set the default date format

*** This issue has been marked as a duplicate of issue 30216 ***
Comment 12 nick.gunz 2014-08-18 17:01:49 UTC
I'm provisionally changing this back to 'verified', from 'resolved'.  I would be grateful if people could advise on how this issue should be classified.  If, in fact, it has genuinely been resolved I would be happy to set it back.  As of now, however, the issue does not appear to have been resolved.

This bug was marked as a duplicate of issue 30216.  On its face, that seems incorrect:

- Issue 30216 is a feature request for a user-definable date format.

- This issue is a problem in which one standard date format changes to another and different standard date format without user action. 

The two issues seem to have little in common, other than that they both involve date formats.  It is possible that issue 30216 has now been resolved in such a way that the date format architecture is greatly altered and this issue has been fixed in the process.  If this is the case, however, it would seem logical to mark this issue as 'fixed' rather than 'duplicate'.

As of now, we have multiple reports of this issue being reproducible across multiple platforms. It seems to be unresolved, so I am setting the status back to 'verified'.