GNOME Bugzilla – Bug 617208
Dates formatted as GENERAL loose formatting when exported to ODF
Last modified: 2010-04-30 04:55:26 UTC
Dates get reformatted as numbers when saving to ods 1) Create a new sheet 2) in cell A1 type "July 2, 2010" without quotes 3) save the sheet as .gnumeric 4) close the sheet and reopen it 5) Verify it that it is still a date in A1 6) save as .ods 7) close and reopen 8) see "40361" in A1
The format of the cell A1 is "General" (notwithstanding that the format dialog figures out that it is a date and shows the default date format.) ODF attaches the data style to the cell style and the table cell then refers tot he cell style. We currently save all cell styles. Since the cell style of A1 is also used by all other cells, and every cell style can only have a single data style, it is not clear how this should be fixed. (The obvious choice would be to save a separate style for each cell but this would create very large files.)
We are now exporting dates and times in such a way that OOo can (and will) recognize that they are dates even if we don't set a date or time format for them. Gnumeric still reads them as floating point numbers.
I should have noted that OOo will formatted the dates in what it considers its default format for dates. This seems to include a time field of 0:00.
Within the limits imposed by ODF this should now be fixed. (Gnumeric will save and load correctly through ODF, other ODF implementations should recognize dates and times and format them in their default style.)