Issue 126361 - user-field of type date has wrong value with locale en/US
Summary: user-field of type date has wrong value with locale en/US
Status: UNCONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: 4.1.1
Hardware: PC Windows 7
: P5 (lowest) Normal with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-11 12:55 UTC by aoo
Modified: 2015-10-24 15:53 UTC (History)
2 users (show)

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


Attachments
userfield declaration only in style.xml (8.88 KB, application/vnd.oasis.opendocument.text)
2015-06-11 12:55 UTC, aoo
no flags Details
userfield declaration only in content.xml (8.88 KB, application/vnd.oasis.opendocument.text)
2015-06-11 12:56 UTC, aoo
no flags Details
userfield declaration in style.xml and content.xml (8.92 KB, application/vnd.oasis.opendocument.text)
2015-06-11 12:57 UTC, aoo
no flags Details
userfield declaration in style.xml and content.xml, get userfield in header and body (8.94 KB, application/vnd.oasis.opendocument.text)
2015-06-11 12:57 UTC, aoo
no flags Details
Failed Test 3 Stack trace (117.93 KB, text/plain)
2015-10-24 15:53 UTC, Charles
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description aoo 2015-06-11 12:55:36 UTC
Created attachment 84785 [details]
userfield declaration only in style.xml

The attached document contains a userfield in the header of the type date. The document was generated by changing the xml of the userfield named "date" to datatype "date" and setting the date-value tag to "2015-05-10T12:00:00".

If you open the documents in the Apache OpenOffice 4.1.1 German (Germany) on Windows 7, then you will see in the header the correct date wrongly formatted "05/10/2015 12:00:00" instead of "10.05.2015 12:00:00" as defined in the document. For the document date-userfield-decl-style-and-body-header-content.dot, the date is shown in the header as "05/10/2015 12:00:00" instead of "10.05.2015 12:00:00", for the body it is shown correctly as "10.05.2015 12:00:00".

Additional I have installed the English Language Pack . If you change the language of OpenOffice to English (US) for User language, locale and default language for documents, then the behaviour is different:
 
 * date-userfield-decl-style.dot (userfield declaration only in style.xml):
    The date in the header is shown as "05/10/2015 12:00:00" instead of
    "10.05.2015 12:00:00"

 * date-userfield-decl-body.dot (userfield declaration only in content.xml):
    The date in the header is shown as "08/07/3053 00:00:00" instead of
    "10.05.2015 12:00:00"

 * date-userfield-decl-style-and-body.dot
   (userfield declaration in style.xml and content.xml):
    The date in the header is shown as "08/07/3053 00:00:00" instead of
    "10.05.2015 12:00:00"

 * date-userfield-decl-style-and-body-header-content.dot
   (userfield declaration in style.xml and content.xml, get userfield in
    header and body):
    The date in the header is shown as "08/07/3053 00:00:00" instead of
    "10.05.2015 12:00:00"
    The date in the body is shown as "07.08.3053 00:00:00" instead of
    "10.05.2015 12:00:00"
Comment 1 aoo 2015-06-11 12:56:22 UTC
Created attachment 84786 [details]
userfield declaration only in content.xml
Comment 2 aoo 2015-06-11 12:57:14 UTC
Created attachment 84787 [details]
userfield declaration in style.xml and content.xml
Comment 3 aoo 2015-06-11 12:57:41 UTC
Created attachment 84788 [details]
userfield declaration in style.xml and content.xml, get userfield in     header and body
Comment 4 aoo 2015-06-11 13:44:27 UTC
Small correction: The expected date format is "05/10/2015 12:00:00", not "10.05.2015 12:00:00".
Comment 5 Charles 2015-10-24 15:49:53 UTC
Bug Comment Notes:

Below are my configuration settings and steps and tests that I did to try to reproduce issue.  I only managed to partially recreate the issue due to missing replication steps.

Computer Settings:  

Macbook:
Operating system: OS X Yosemite version 10.10.5
Processor: 2 GHz Intel Core 2 Duo
Memory: 8 GB 1067 MHz DDR3

Language & Region Preferences:
Region:   United Kingdom
Calendar: Gregorian
Time format: 24-Hour Time

OpenOffice Version: Apache OpenOffice 4.1.1   (AOO411m6(Build:9775)  -  Rev. 1617669
2014-08-13 09:05:42 (Wed, 13 Aug 2014)
Addtional Information:
Attached examples document are downloaded in .odt (open office format) and not .xml or dot format.

Steps to partially reproduce the bug.

Test 1:
1. Opened examples Documents (.odt) in open office.
2. Click on menu File, Send, create HTML document.
3. Create html document.
4. Open created html document in chrome browser

Result: date format is displayed as 07/08/3053 00:00:00 
This is for the following documents.
	date-userfield-decl-body.dot
        date-userfield-decl-style-and-body.dot
        date-userfield-decl-style-and-body-header-content.dot


Other tests I attempted.

Test 2:
1. Opened examples Documents (.odt) in open office.

Result 1:
date-userfield-decl-style.dot (userfield declaration only in style.xml)
contains 42134.5 in header and not "05/10/2015 12:00:00" or "10.05.2015 12:00:00

date-userfield-decl-body.dot (userfield declaration only in content.xml):
contains 42134.5 in header and not date format.

date-userfield-decl-style-and-body.dot
contains 42134.5 in header not date format.

date-userfield-decl-style-and-body-header-content.dot
contains 42134.5 in header & content and not date format not date format.


Test 3:
1. Change file format of files from .odt to .xml
2. Opened examples Documents (.odt) in open office.

Result: same as Test 2.

 
Test 3:
1. Opened examples Documents (.odt) in open office.
2. Save documents as an xml file such as
DocBook (.xml)
Microsoft (.xml)

Result: Open office crashes during saving of these documents.  

Note: I've attached the stack trace just for 'information' of this crash.  I will raise a separate but report for this bug. 

Test 4: 
1. Opened examples Documents (.odt) in open office.
2. Double click on 42134.5
3. Edit Date to format.
4. Click on save.
Result:  Nothing happens.  Date still remains the same 				  42134.5 inside document.
Comment 6 Charles 2015-10-24 15:53:35 UTC
Created attachment 85071 [details]
Failed Test 3 Stack trace