Re: [Lynx-dev] the sun, the sun

2020-08-09 Thread Thorsten Glaser
David Woolley dixit:

> I can't find the original for this thread, but days are not 86400
> seconds, which are currently defined in terms of a quantum transition
> frequency.  The actual length of a day is less stable than this. Leap
> seconds are introduced into UTC to correct for this.

The general idea is to keep the following definitions…

UT1: universal time, based on days of 86400 UT1-seconds of
 variable (observed, not predictable) length

UTC: coordinated universal time; basis for human timekeeping (struct tm),
 uses SI seconds; days are 86400 or 86401 constant-length seconds

TAI: international atomic time; uses SI seconds; should be basis
 for Unix timekeeping (SI seconds since the epoch) but people
 seem to use it with 86400-second days (which is wrong)

… and invariants:

• n = UTC - TAI, n ∈ ℤ (though ℕ really)

• abs((DUT1 = UT1 - UTC)) < 0.9 s

That is, UTC is managed by starting with TAI and inserting as many
leap seconds as necessary to ensure the difference to UT1 is less
than 0.9 s either way; leap seconds are generally inserted at the
end of the year or Q2 (at an UTC day’s end), and the previously re‐
served concepts of adding two leap seconds at once or having negative
leap seconds are abandoned, given celestial movement won’t need them.

Incidentally, POSIX demands that time_t is UTC-without-leap-seconds
(not the same as TAI due to a numerical offset/bias), but German law
demands that leap seconds are counted, so time_t on MirBSD is UTC with
leap seconds. (But struct tm is correct, and the user gets functions
to convert, and even a posixtz.so LD_PRELOADable library, and utilities
like rsync that transmit time_t get patched to convert on boundary.)

Anyway, standards suck, and not honouring them sucks either, and
conflicting standards suck more, and self-inconsistent standards
*cough*ACPI*cough* suck the most. Back to topic.



It’s trivial to use  (here ) as flag value instead
of (char *)-1 which is fragile. If you don’t want to do that, either use
a separate boolean (uint8_t to save space) flag value, or restructure
the code so it doesn’t need a flag.

bye,
//mirabilos
-- 
22:20⎜ The crazy that persists in his craziness becomes a master
22:21⎜ And the distance between the craziness and geniality is
only measured by the success 18:35⎜ "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent

___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] the sun, the sun

2020-08-09 Thread David Woolley

On 08/08/2020 23:29, Halaasz Saandor via Lynx-dev wrote:
I suspect that it is time to detach the physical second, that physicists 
use, from the second that is one 86400th of a day, and find a definition 
of "day" that depends on our experience of sunlight. The last definition 
that I found makes a day 86400 seconds.


I can't find the original for this thread, but days are not 86400 
seconds, which are currently defined in terms of a quantum transition 
frequency.  The actual length of a day is less stable than this. Leap 
seconds are introduced into UTC to correct for this.


(Also, a solar day is not constant throughout the year, because the 
earth's orbit round the sun is elliptical.)


_______
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev


Re: [Lynx-dev] the sun, the sun

2020-08-08 Thread Halaasz Saandor via Lynx-dev

2020/08/08 17:43 ... Steffen Nurpmeso:

Being all in favour of
keeping UTC aligned with the sun, whatever this means.


I suspect that it is time to detach the physical second, that physicists 
use, from the second that is one 86400th of a day, and find a definition 
of "day" that depends on our experience of sunlight. The last definition 
that I found makes a day 86400 seconds.


___
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev