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 644217 - Date in Document properties hasn't locale format
Date in Document properties hasn't locale format
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other All
: Normal minor
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-03-08 17:00 UTC by Marek Černocký
Modified: 2011-03-11 19:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Document Properties dialog screenshot (43.24 KB, image/png)
2011-03-08 17:00 UTC, Marek Černocký
  Details
Tentative patch (3.76 KB, patch)
2011-03-08 19:13 UTC, Morten Welinder
none Details | Review
gsf patch (3.57 KB, patch)
2011-03-11 18:16 UTC, Morten Welinder
none Details | Review

Description Marek Černocký 2011-03-08 17:00:13 UTC
Created attachment 182844 [details]
Document Properties dialog screenshot

Created and Modified date hasn't right locale format in Document Properties dialog. Accessed date is OK. See the attachment.
Comment 1 Morten Welinder 2011-03-08 19:13:00 UTC
Created attachment 182852 [details] [review]
Tentative patch

Something like this ought to work, but I am not sure of the consequences.

Andreas: ?
Comment 2 Morten Welinder 2011-03-08 20:33:32 UTC
I committed the dialog part of this.  We certainly that.
Comment 3 Marek Černocký 2011-03-08 21:06:50 UTC
It works for saved files now.
For new unsaved file Created date is displayed only and this date is still bad.
Comment 4 Morten Welinder 2011-03-08 21:15:18 UTC
> It works for saved files now.

Assuming that "now" means the current state of git, then that is the
expected result.  The rest of the patch is needed for newly "Created"
documents.
Comment 5 Andreas J. Guelzow 2011-03-08 21:31:01 UTC
Review of attachment 182852 [details] [review]:

I think there are problems with this patch:

1) It introduces inconsistencies: We cannot recognize if arbitrary properties are containing date strings. So on the properties tab only the known ones are changed to locale while the unknown ones are kept as time stamps, for example in some of my files there is meta:printdate.

2) I would expect the properties page to show the true meta data as saved in the file rather than some modified version. This may become important when we implement the addition of user meta properties. (That does not seem to be implemented at this time.)
Comment 6 Morten Welinder 2011-03-09 13:52:24 UTC
The inconsistency is already there: when read from opendoc or xls, we
recognize things as dates.  future setting of meta:printdate (from
gnumeric) would be marked as timestamps and rendered accordingly.

(I note now that things of type GsfTimestamp do not round-trip via
.gnumeric -- that's pretty bad.)
Comment 7 Andreas J. Guelzow 2011-03-09 17:33:29 UTC
Okay, please commit. We should probably fix the round-trip through gnumeric though. :-)
Comment 8 Morten Welinder 2011-03-11 16:15:35 UTC
Patch committed.  Keeping open for a look at .gnumeric persistence.
Comment 9 Morten Welinder 2011-03-11 18:16:52 UTC
Created attachment 183172 [details] [review]
gsf patch

This patch (for libgsf) does...

1. Fix a typo where dates got marked "data".
2. Honour the type on load.

Comments?

Should files incorrectly marked "data" be read as "date"?
Comment 10 Morten Welinder 2011-03-11 18:18:25 UTC
Also note that lots of types get mapped into double

		case G_TYPE_INT:
		case G_TYPE_UINT:
		case G_TYPE_LONG:
		case G_TYPE_ULONG:
		case G_TYPE_FLOAT:
		case G_TYPE_DOUBLE:
			type_name = "float";

and string:
		case G_TYPE_CHAR:
		case G_TYPE_UCHAR:
		case G_TYPE_STRING:
		case G_TYPE_ENUM:
		case G_TYPE_FLAGS:
			type_name = "string";

This isn't new.
Comment 11 Andreas J. Guelzow 2011-03-11 18:40:49 UTC
I would think that the answer to "Should files incorrectly marked "data" be read as "date"?" should be: yes, definitely!
Comment 12 Andreas J. Guelzow 2011-03-11 18:43:51 UTC
Otherwise the patch looks good to me.
Comment 13 Morten Welinder 2011-03-11 19:02:47 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.