Timespec <-> string functions?
Dave Peticolas
dave@krondo.com
20 Nov 2001 13:26:00 -0800
--=-mZWpLUWUlP+Quzz7Qscr
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Tue, 2001-11-20 at 11:45, Derek Atkins wrote:
> Is there any particular reason that the XML generators/parsers
> create their own functions to convert Timespec to string (and
> vice-versa) instead of using the gnc_timespec_to_iso...() and
> gnc_iso..._to_timespec() functions?
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.
> 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 :)
dave
--=-mZWpLUWUlP+Quzz7Qscr
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA7+spo5effKKCmfpIRArAXAJ9gYkVdQX+qu4rJLJ/JQF+N8Xk4NQCgoTuN
ZXz1jEYlswBD2dwNRJajw/c=
=mMzS
-----END PGP SIGNATURE-----
--=-mZWpLUWUlP+Quzz7Qscr--