Date: Tue, 19 Feb 2008 18:19:53 +1100 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Tim Kientzle <kientzle@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libarchive archive_read_support_format_iso9660.c Message-ID: <20080219071953.GP64299@server.vk2pj.dyndns.org> In-Reply-To: <200802190602.m1J622Fe079227@repoman.freebsd.org> References: <200802190602.m1J622Fe079227@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Nx8xdmI2KD3LNVVP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 19, 2008 at 06:02:02AM +0000, Tim Kientzle wrote: > Without that, I > don't see a really good alternative to just giving up and converting to > localtime with mktime(). (I suppose I should research the Perl library > approach for computing an inverse function to gmtime(); that might > actually be simpler than this growing list of hacks.) mktime() and timegm() basically use successive approximation (binary search) with localtime() and gmtime() - so you can fairly easily create your own timegm(). If you have a normalised date, I have a direct formula to go from year/month/day to number of days past some epoch for dates covering at least the 32-bit Unix epoch (I haven't checked to see where the boundaries actually are). --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --Nx8xdmI2KD3LNVVP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHuoMZ/opHv/APuIcRAgTgAJ9cDm5+pxr4E5OzDkzuak5DrNY54wCgp6IY iMULHFNNiD1XFOR4liaZhQk= =I/yP -----END PGP SIGNATURE----- --Nx8xdmI2KD3LNVVP--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080219071953.GP64299>