After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 617208 - Dates formatted as GENERAL loose formatting when exported to ODF
Dates formatted as GENERAL loose formatting when exported to ODF
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
1.10.x
Other All
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-04-29 19:42 UTC by Alex Converse
Modified: 2010-04-30 04:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alex Converse 2010-04-29 19:42:57 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
Comment 1 Andreas J. Guelzow 2010-04-29 20:41:30 UTC
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.)
Comment 2 Andreas J. Guelzow 2010-04-29 21:41:52 UTC
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.
Comment 3 Andreas J. Guelzow 2010-04-29 21:43:18 UTC
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.
Comment 4 Andreas J. Guelzow 2010-04-30 04:55:26 UTC
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.)