Liste des Groupes | Revenir à cl c |
On 4/16/2025 3:04 PM, Scott Lurndal wrote:[...]Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:candycanearter07 <candycanearter07@candycanearter07.nomail.afraid>
writes:
>Back in the mainframe days, it was common to use julian datesDatetime is a nightmare, this is why we use a simple seconds-since-X>
system.
Indeed. That makes it a slightly less unpleasant nightmare.
as they were both concise (5 BCD digits/20 bits) and sortable.
YYDDD
If time was neeeded, it was seconds since midnight in a reference
timezone.
One shorthand is to assume a year is 365.25 days (31557600 seconds),
and then base everything else off this (initially ignoring things like
leap-years, etc, just assume that the number of days per year is
fractional).
>
Then, say, 2629800 seconds per month, ...
For some other calculations, one can assume an integer number of days
(365), just that each day is 0.07% longer.
>
For date/time calculations, one could then "guess" the date, and
jitter it back/forth as needed until it was consistent with the
calendar math.
>
Estimate and subtract the year, estimate and subtract the month, then
the day. Then if we have landed on the wrong day, adjust until it
fits.
>
Not really sure if there was a more standard way to do this.
As for time since epoch:
Microseconds (in a power-of-10 sense) are more common...
Les messages affichés proviennent d'usenet.