Re: [Snowy] [Tomdroid-dev] a note's last-change-date



On Sat, Jan 23, 2010 at 1:22 AM, Sandy Armstrong <sanfordarmstrong gmail com> wrote:
If there is a better "universal" datetime format (for example, just
using Zulu), then let's figure that out and we can update the REST API
spec to be a little more specific about what datetime formats it
accepts and what format it returns.  Fixing Snowy would be easy here;
I can't speak for the U1 guys, I guess it depends on how they store
the dates.

After some more research I found out that tomboy's time format is not your usual ISO 8601 and that saying RFC 3339 is more specific.

Anyway, I've found a fast android sdk class that parses rfc3339 so I can drop the big and expensive jodatime library (a 200k jar).

There is one remaining problem is with millisecond precision. Usual rfc3339 datetime is:

"2008-10-13T16:00:00.000Z"
"2008-10-13T16:00:00.000+07:00"
"2008-10-13T16:00:00.000-07:00"
"2008-10-13"

And tomboy has more than millisecond precision:

2010-01-23T12:07:38.7743020-05:00

So I'm getting a parse error where the +/- character should be.

Short term, I'll regexp out the additional precision and store in the database using UTC (to avoid sqlite's own problems). Foreseeable problems doing that?

Long term, we could try to agree on a dateformat that is accessible from standard libs in Java, C#, Python, C/C++ with minimal fuss. I'm interested in changing the note spec not only the REST API because I feel that a portion of users want the note files to be portable and would not necessarily want to trust a cloud service.

Thanks for the help! It's very nice to port an application when the dialogue is good with the current maintainer. Cheers to Sandy!
--
Olivier Bilodeau <olivier bottomlesspit org>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]