cvs commit: src/lib/libc/stdtime localtime.c

Peter Jeremy peterjeremy at optushome.com.au
Fri Jan 19 09:32:31 UTC 2007


On Fri, 2007-Jan-19 01:16:35 +0000, Warner Losh wrote:
>imp         2007-01-19 01:16:35 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    lib/libc/stdtime     localtime.c 
>  Log:
>  On FreeBSD/arm, any value > 50 bits will result in a rediculously huge
>  number being returned for mktime and timegm calls.

Actually, I have some code that can convert a UTC struct tm into a
time_t without any loops[1].  Converting localtime would need a couple
of probes to handle DST.  This should be far more efficient than a
binary search.  Is there any interest in this?

[1] The date to day number core started as a FORTRAN one-liner but I
    can't find the source.  I've written C and perl versions and
    exhaustively tested them.
-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20070119/71485301/attachment.pgp


More information about the cvs-src mailing list