Timespec <-> string functions?

Derek Atkins warlord@MIT.EDU
20 Nov 2001 17:16:47 -0500


Dave Peticolas <dave@krondo.com> writes:

> Well, Timespecs have nanosecond resolution while
> the iso 8601 routines have something like microsecond
> resolution. So if we want to preserve that info in
> XML, we can't use the iso routines.

I think that usec resolution is sufficient for my needs.  Consider
that on many platforms "struct timespec" only provides usec resolution
anyways.

> > Also, it would be nice if there were a "gnc_timespec_to_iso.._gmt()"
> > so that one could store a string in GMT.  Either that, or it would
> > be nice if there were a Timespec kvp type.  Either way works
> > for me :)
> 
> The latter would be very useful, but would also be more work.
> To add a new kvp type you need to implement it in C, scheme,
> xml, and sql :)

This didn't answer the question of whether the latter is the
"Right Thing" or not?  ;)

> dave

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available