[tz] What's "right"?
John Haxby
john.haxby at oracle.com
Fri Nov 13 21:11:58 UTC 2020
> On 13 Nov 2020, at 02:13, Guy Harris <gharris at sonic.net> wrote:
>
> On Nov 12, 2020, at 10:34 AM, Steve Allen <sla at ucolick.org> wrote:
>
>> On Thu 2020-11-12T10:11:26-0800 Guy Harris hath writ:
>>> I.e., that's a counter that started as 0 on January 1, 1970,
>>> 00:00:00 UTC, and that increments by 1 every second, rather than
>>> getting adjusted to conform to POSIX.
>>
>> With the historical caveat that as of 1970 there was not yet any
>> official document that specified the name UTC. Until 1974 UTC was
>> jargon internal to time service bureaus. Most available sources
>> of time used different terminology.
>
> So what POSIX says in section 3 "Definitions":
>
> https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html
>
> is
>
> 3.150 Epoch
>
> The time zero hours, zero minutes, zero seconds, on January 1, 1970 Coordinated Universal Time (UTC).
>
> and what it says in section A.3 "Definitions" of the Rationale:
>
> https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap03.html
>
> is
>
> Epoch
>
> 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.
>
> with no indication of how they define "zero hours, zero minutes, zero seconds, on January 1, 1970 Coordinated Universal Time (UTC)."
>
> Should there be a request for clarification of what they mean by that?
It's messy. When I was looking into this a few years ago I was looking at various different parts of the standards to try to find out what was actually meant.
The definition of the epoch gets blurred depending on where you look :) If you do "date -d @0" on a Unix machine it does indeed say it's right at the start of 1970 ("Thu 1 Jan 01:00:00 BST 1970" here in the UK :)).
However.
If the wall clock time for the Unix Epoch is not the stroke of midnight -- it *moves*. And it moves because a day is exactly 86400 seconds. In the real world though there have been 27 (I think) days between the Posix Epoch and now where a day was 86401 seconds.
If you use a right timezone on Linux then you have to live with minor but irritating problems with programs that implicitly assume the Posix day length. For those applications that really don't work unless you're using a right/ timezone, that minor annoyance is a price worth paying.
jch
More information about the tz
mailing list