[plt-scheme] Time Base

From: Doug Williams (m.douglas.williams at gmail.com)
Date: Tue Dec 15 16:20:25 EST 2009

The data/time routines in PLT Scheme have many warning about using the
actual values for current-seconds, etc directly and about the base time that
is used. At least on Windows and Linux (Ubuntu 9.10 in this case),
current-inexact-milliseconds seems to return the number of milliseconds
since  00:00:00.000 1 Jan 1970. Is this the case for all systems.

I am implementing RFC 4122 (UUIDs) and need a good time implementation. I
was using SRFI 19, but it turns out to be problematic. The reference
implementation, which is pretty much what is in PLT Scheme, has errors - in
particular, the nanoseconds calculations are off by a factor of 100 and it
ripples through some of the other calculations and the author has withdrawn
support. There are patches around for some of these problem in other Scheme
implementations, but I haven't tracked them all down (or checked the PLT
Scheme bug list). And, I really don't need all that SRFI 19 provides.

My implementation is fine (and simple) if the above assumption about
current-inexact-milliseconds is correct.

Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20091215/a87bcd08/attachment.html>

Posted on the users mailing list.