Sujet : Re: "A diagram of C23 basic types"
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 16. Apr 2025, 00:42:05
Autres entêtes
Organisation : None to speak of
Message-ID : <87plhd0z76.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Gnus/5.13 (Gnus v5.13)
BGB <cr88192@gmail.com> writes:
On 4/15/2025 9:10 AM, Scott Lurndal wrote:
BGB <cr88192@gmail.com> writes:
On 4/14/2025 5:33 PM, Lawrence D'Oliveiro wrote:
On Mon, 14 Apr 2025 13:36:07 -0500, BGB wrote:
>
On 4/14/2025 12:40 PM, candycanearter07 wrote:
>
Lawrence D'Oliveiro <ldo@nz.invalid> wrote at 04:33 this Monday (GMT):
>
I worked out that an integer of a little over 200 bits is sufficient
to represent the age of the known Universe in units of the Planck
interval (5.39e-44 seconds). Therefore, rounding to something more
even, 256 bits should be more than enough to measure any physically
conceivable time down to that resolution.
>
The problem then becomes storing that size.
>
More practical is storing the time in microseconds.
>
Relative to what epoch?
>
>
Probably still Jan 1 1970...
Technically, it depends on the timezone:
Technically, it does not.
POSIX defines the epoch as follows:
Historically, the origin of UNIX system time was referred to as
"00:00:00 GMT, January 1, 1970". Greenwich Mean Time is actually not
a term acknowledged by the international standards community;
therefore, this term, "Epoch", is used to abbreviate the reference
to the actual standard, Coordinated Universal Time.
The epoch is a specified moment in time. That moment can be
expressed as midnight UTC Jan 1 1970, as 4PM PST Dec 31 1969,
or (time_t)0. GMT/UTC is just a convenient way to specify it.
$ date --date="@0"
Wed Dec 31 16:00:00 PST 1969
Yes, the date command by default uses the local time zone by default.
Well, and however much error there is from decades worth of leap
seconds, etc...
Yes, leap seconds are an issue (and would be for any of the proposed
alternatives).
But, yeah, better if one had a notion of time that merely measured
absolute seconds since the epoch without any particular ties to the
Earth's rotation or orbit around the sun. Whether or not its "date"
matches exactly with the official Calendar date being secondary.
That's called TAI; it ignores leap seconds. See clock_gettime()
(defined by POSIX, not by ISO C). (Not all systems accurately record
the number of leap seconds, currently 37.)
Most systems don't use TAI for the system clock, because matching civil
time is generally considered more important than counting leap seconds.
[...]
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */