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 581844 - System.DateTime implementation produces timestamps incompatible with Tomboy
System.DateTime implementation produces timestamps incompatible with Tomboy
Status: RESOLVED FIXED
Product: gnote
Classification: Applications
Component: main
0.3.x
Other Linux
: Normal major
: 1.0
Assigned To: gnote-maint
gnote-maint
Depends on:
Blocks:
 
 
Reported: 2009-05-08 09:50 UTC by Mackenzie Morgan
Modified: 2009-06-15 19:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mackenzie Morgan 2009-05-08 09:50:13 UTC
When a note is opened in GNote, the timestamp is updated.  Unfortunately, the format of the timestamp with GNote is like this:
2009-04-20T04:29:23.219734Z

Tomboy's timestamps are formatted like this:
2008-11-04T15:35:42.2542360-05:00

Note that GNote is writing timestamps in Zulu and appending a Z to denote that.  Tomboy uses the "-05:00" format of offsetting from UTC.

The effect is that if you open a note in GNote and then that note makes its way to ~/.tomboy (copying, synchronizing, symlinking .tomboy->.gnote, whatever), Tomboy will do naught but crash on startup.
Comment 1 Hubert Figuiere (:hub) 2009-05-08 15:14:37 UTC
If tomboy crash then Gnote is not the one with the bug.

Copying the notes back to Tomboy is not supported either.

iso8601 conversion is done by glib.

This bug is likely WONTFIX candidate.
Comment 2 Mackenzie Morgan 2009-05-08 15:34:52 UTC
Do you intend to be compatible with Tomboy or not?  I consider interoperability and standard formats a Good Thing.  Yes, these are both iso8601, but why use the UTC one when the application it's meant to emulate uses localtime?  That doesn't seem like very complete emulation.
Comment 3 Sandy Armstrong 2009-05-08 15:38:14 UTC
Tomboy crashing is a Tomboy bug; I will fix that, because I do care about users being able to do whatever they want with their notes.

I also think that we should cooperate on note XML format...I had assumed Gnote was creating identical notes as Tomboy, but if there is a reason that cannot be, it seems like it's in everybody's best interest to try to have some compatibility.
Comment 4 Hubert Figuiere (:hub) 2009-05-08 15:54:19 UTC
The date looked like it it was ISO 8601 so I assumed it was and let glib handle it for me. Yes there is a difference between GMT and local time, but as long as this time offset is taken into account (and it is), it shouldn't even be relevant.
Comment 5 Sandy Armstrong 2009-05-10 16:39:22 UTC
In git master, Tomboy now allows more date formats and is overall more defensive in its note XML parsing.
Comment 6 Hubert Figuiere (:hub) 2009-05-11 02:29:45 UTC
marking as fixed. Thanks Sandy.
Comment 7 Sandy Armstrong 2009-06-15 16:30:35 UTC
Hey Hubert, I notice the status on this changed to UNCONFIRMED. Need any more work done on the Tomboy side?
Comment 8 Hubert Figuiere (:hub) 2009-06-15 16:42:33 UTC
no no. product = gnote

it is for me :-)

thanks.
Comment 9 Hubert Figuiere (:hub) 2009-06-15 16:48:13 UTC
for the record, it is an issue in glib or libc. If the tv_usec value of GTimeVal is 0, g_time_val_to_iso8601() (by way of the libc) just skip the usec value, that Tomboy is expecting.

This is definetely wrong one way or the other, and sandy prevented the crash from malformed input, I have to fix this side too.
Comment 10 Hubert Figuiere (:hub) 2009-06-15 17:23:18 UTC
This time it is really fixed. But, Mackenzie, instead of going nuts by claiming *everywhere* that Gnote is a vendor lock-in, provide the data set to be examined by the developer. Yes it was a bug, but it took me some digging to figure out what was happening, having provided with the data set, it would have been easier.

This will be in 0.5.0 that I will release Wednesday.

Thanks to Sandy for the help.
Comment 11 Mackenzie Morgan 2009-06-15 18:36:27 UTC
I gave you the exact strings that were causing the incompatibility. Are two whole notes really necessary when they match in every other way and manually editing any note to have a timestamp like the other does it?

How did you want me to interpret "Copying the notes back to Tomboy is not supported either...WONTFIX," if not creating lock-in, preventing users who so much as try it out for 5 minutes from not being able to go back?
Comment 12 Hubert Figuiere (:hub) 2009-06-15 19:01:24 UTC
Except that said data do work in both situation. The timezone was not the problem.

But on the internet it is easier to point the problem wrongly than finding the proper solution.

And yes my mistake I closed the bug too fast after the ultra quick-fix from Sandy.