Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 2005 14:49:28 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        phk@phk.freebsd.dk
Cc:        trhodes@freebsd.org, scottl@samsco.org, src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, fullermd@over-yonder.net, linimon@lonesome.com
Subject:   Re: cvs commit: src/sys/sys _timeval.h src/sys/fs/procfs procfs_status.c src/libexec/bootpd bootpd.c src/sys/dev/acpica/Osd OsdSynch.c src/sys/dev/firewire sbp.c 
Message-ID:  <20051227.144928.82232329.imp@bsdimp.com>
In-Reply-To: <47758.1135718178@critter.freebsd.dk>
References:  <20051227.140049.73660062.imp@bsdimp.com> <47758.1135718178@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <47758.1135718178@critter.freebsd.dk>
            "Poul-Henning Kamp" <phk@phk.freebsd.dk> writes:
: Imagine if the epoch for 64 bit time_t was set to coincide with Julian
: Day zero using the rather naiive POSIX math:
: 	N [days] * 86400 [seconds/day]
: Converting from an old time_t to the new one would entail adding an
: constant offset, no big deal.

I'd rather see it as Modified Julian Day, since the MJD has an epoch
that starts at midnight, while JD starts at noon.  This is a change
since the current Unix Epoch starts at midnight.  MJD = JD - 2400000.5
It is 24537312.4 JD and 53731.9 MJD, more or less, UTC as I write
this.

Either epoch is fine for the range of the 64-bit number.  In fact, you
can encode about a size hundred thousand range of years (+- 292271
years) of microseconds as a 64-bit number.  Nano seconds give only
about 300 years.  The microsecond conversion would be also easy and
trivial....

Warner

P.S. http://tycho.usno.navy.mil/mjd.html is a good reference for mjd
if you're unfamiliar with what phk and I are talking about.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051227.144928.82232329.imp>