cvs commit: src/lib/libarchive archive_read_support_format_iso9660.c

Peter Jeremy peterjeremy at optushome.com.au
Mon Feb 18 23:19:57 PST 2008


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).

-- 
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.
-------------- 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/20080219/b6dffc57/attachment.pgp


More information about the cvs-src mailing list