Issue 19494 - Date format not saved
Summary: Date format not saved
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC4
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2003-09-12 17:35 UTC by jareklub
Modified: 2017-05-20 11:25 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description jareklub 2003-09-12 17:35:45 UTC
To reproduce, 

Insert -> Fields -> Other
Type    Select       Format
DATE    DATE(fixed)  1999-12-31

Save, close and reopen document

Date format is now 9/12/03 though it was inserted as 2003-09-12 before

Comment 1 jack.warchold 2003-09-15 18:54:52 UTC
i followed your steps but i can't reproduce this issue

reassigned to jw
Comment 2 jack.warchold 2003-09-15 18:55:51 UTC
set to WFM as long as not reproduced eiter by you on a nother mashine 
or by someone else
Comment 3 jareklub 2003-09-15 20:25:13 UTC
This problem seems related to the selection of locale.  The formated
date comes back correctly when I choose another locale (I've tried
English (United States), Danish and Finnish). When I switch back to my
own locale, namely Swedish, the date format is wrong.
I'll try to see if I can reproduce it on some other Windows OS at work.

I've tried this on another W2000 machine (Dual P4) with the same result.

Comment 4 jareklub 2003-09-16 09:51:37 UTC
FWIW, I've tried this on WinXP too with the same result, i.e. that the
format is not correctly recovered after save when the locate setting
is Swedish and is allright for the English and most other locales.

Comment 5 jack.warchold 2003-09-16 11:36:55 UTC
hi jarek,
can you tell me what OOo local version you have installed?
maybe with a link to the location you downloaded it from!
Comment 6 jareklub 2003-09-16 17:07:04 UTC
> can you tell me what OOo local version you have installed?
> maybe with a link to the location you downloaded it from!
It's the english version. Most probably downloaded from

which is where I usually download from.

Comment 7 jack.warchold 2003-09-17 09:06:55 UTC
could reproduce this.
it just occurs on some date formats when swedish locals are set in the 
office options

date format "Wednesday, September 17, 2003" would be saved and is 
still set after closing and reopening the document
date format "2003-09-17" changed to "9/17/03" after closing and reopen 
the document.

reassigned to mib

please take a look at this issue.
set target to OOo2.0
Comment 8 utomo99 2003-09-24 07:17:53 UTC
utomo> jw :
change to new ? 
Comment 9 michael.brauer 2003-09-26 15:08:26 UTC
The date format is stored correctly in the file, but when loading
file, it is not assgined to the field agin. 
Comment 10 michael.brauer 2003-09-26 15:14:44 UTC
Comment 11 michael.brauer 2004-11-01 15:00:39 UTC
MIB->ER: The date format exported correctly. It is also imported, but when it is
added to the number formater using GetEntryKey, the wrong format id (30 rather
than 84 if locale is german) is returned. GetEntryKey is called from
SvXMLNumFormatContext::CreateAndInsert in xmloff/source/style/xmlnumfi.cxx
Comment 12 michael.ruess 2004-11-02 12:24:18 UTC
seems like mib assigned this to wrong person.
Comment 13 ooo 2004-11-05 20:52:23 UTC
This seems to be a Writer problem. It occurs only if, upon creating the
document, the locale is set to Swedish-Sweden but the current document language
is set to English-US, for example. It does not occur if the document language is
also set to Swedish. One part of the problem seems to be that the sv_SE default
date format is yyyy-mm-dd, and the number format used for the date field is not
remembered to be an en_US format, so when loading it results in "this is
default" which then is merged with the en_US default date format , instead of an
sv_SE one. The issue also does not occur when the format's language is
explicitly set to English-US instead of Automatic in the "Additional formats"
dialog. Since I don't know how the Writer handles that language mix I pass this
on to Oliver.

Comment 14 Oliver Specht 2004-11-17 10:06:21 UTC
Comment 15 mbu 2004-11-17 14:57:55 UTC
I traced this issue with oliver together and we identified what causes the
misbehavior. the file is saved in a correct manner, but during the document gets
loaded again we receive different formats for different "locale" settings. see
SwXTextField::attachToRange, case SW_SERVICE_FIELDTYPE_DATETIME,
m_pProps->nFormat change for different locales.
Comment 16 sascha.ballach 2004-11-29 13:45:14 UTC
after a short discussion back to you ;-)
Comment 17 Oliver Specht 2004-12-03 13:32:34 UTC
As long as the number format is automatically applied at the field the
conversion of the XML representation to the formatting of the internal number
formatter is not lossless. 
This can be prevented by saving the number format togehter with the language
attribute and store the 'automatic' mode in an additonal flag. 

As user the problem can be worked around by assigning a language to the number
format in the 'Additional formats...' dialog

Retarget to later 
Comment 18 tomasstraupis 2007-10-23 14:28:43 UTC
Note that (even with suggested workaround of specifying date format) if document
is saved as ms word (.doc) and opened in ms word - date is ok. If the same .doc
is opened by writer - date is changed (in my case to created->author).
This problem is still on in OO 2.3.0.
Comment 19 Marcus 2017-05-20 11:24:47 UTC
Reset assigne to the default "".
Comment 20 Marcus 2017-05-20 11:25:46 UTC
Reset assigne to the default "".