Date: Fri, 19 Jan 2007 20:32:29 +1100 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Warner Losh <imp@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libc/stdtime localtime.c Message-ID: <20070119093229.GB860@turion.vk2pj.dyndns.org> In-Reply-To: <200701190116.l0J1GZcD021864@repoman.freebsd.org> References: <200701190116.l0J1GZcD021864@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--oC1+HKm2/end4ao3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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=20
> 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.
--=20
Peter Jeremy
--oC1+HKm2/end4ao3
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
iD8DBQFFsJAt/opHv/APuIcRAv/wAJ9+S5iQ254hx2L12gDMFmcvkUnvbACffYig
levrg3QXHLfr8vZ3uxI0hQA=
=b/8g
-----END PGP SIGNATURE-----
--oC1+HKm2/end4ao3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070119093229.GB860>
