From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14843 invoked from network); 4 Jan 2021 21:57:26 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 4 Jan 2021 21:57:26 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id CAE259C837; Tue, 5 Jan 2021 07:57:23 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 0085C9C73A; Tue, 5 Jan 2021 07:57:02 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=bsdimp-com.20150623.gappssmtp.com header.i=@bsdimp-com.20150623.gappssmtp.com header.b="AtHeOMkc"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id CB3499C73A; Tue, 5 Jan 2021 07:56:59 +1000 (AEST) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by minnie.tuhs.org (Postfix) with ESMTPS id 7ED5C9C602 for ; Tue, 5 Jan 2021 07:56:58 +1000 (AEST) Received: by mail-qk1-f178.google.com with SMTP id v126so24827539qkd.11 for ; Mon, 04 Jan 2021 13:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=whXG+lR6Dlw/JaTtXEBqKtmc5iQNYgiGSq30axsZ7DU=; b=AtHeOMkcGyW4lIewZdDTaEyeW9Pi5YqmZcXzpByhFXmV9tKG2BKiVUijZCnhhNY3Sp ReUNJqQiB/fQ1DPR6SJ+458uaXeciwJvFKZfwjiNlZRJyyqdhs48zolWU2BuQnsndmzm JSM4fPo3AlIun6qDHES3NA5Rfe9827/T3tub1azsPZdIJJeROS0jY8FsfgA6I0TonBeH M3X1huTUYcQqoSyFF8+M928qWgjNsKm/SVdeFXqGoDM/97MDtRsYj3q41m9dLdbgat8F APrCkFPThpOjsftbKeGPdw3+pdb5xGHpRI5xWnrZBdVmt0kWbkCoSBoHTEvHcEae3LBN 6ORQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=whXG+lR6Dlw/JaTtXEBqKtmc5iQNYgiGSq30axsZ7DU=; b=j7piBO3E03n4REfLBpKSilAlf+ZRm5KbfugSCDe8Ps93IPxVeZrHLqG/ZGwtzo6HkZ OSEATI40gdRkO92ASOnk6Pjn7ci6lLIudxqbJtuzy9Ym26JZC3CxkBZYIxFpB443heGe +WCGPi1zW/JyvF64BOy2lzexdk6Q+5zSi6y6kd7gGFf8/6YyDGtjzpDQaL7UoLb5V4wl j8Ug6Xodena9lxk4g8+N3t+f5cmC+vgNrKgU8rXU5oblhqZJep4UdaHGE/aEAeoAazE2 970KG0mkbZwo+fTBHoyDfEXuTV6sMM9JjgRggQGB9aIcTRRmMDQyQ6HihxWcO2eVRTtU z9Hw== X-Gm-Message-State: AOAM531327kTpuQDBkBG9XkIASsSfATmHXbUuBJsVD5KL5LTBtApPfMx v5jnL+IiajQyIYTEaErodjjdYhm2XSfBNDvv22NMm9PdP/h00upi X-Google-Smtp-Source: ABdhPJy4keA/l21frNa5IJgBJyMJULx8bUgkMZB3DIRSBJ32ZIUIAb92eJCBzCfrEaNkA94FVsTX2LUk0j25EpAExHI= X-Received: by 2002:a37:a614:: with SMTP id p20mr72079757qke.359.1609797417581; Mon, 04 Jan 2021 13:56:57 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Mon, 4 Jan 2021 14:56:46 -0700 Message-ID: To: Dave Horsfall Content-Type: multipart/alternative; boundary="0000000000003c46fc05b81a2b09" Subject: Re: [TUHS] The 2038 bug... X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --0000000000003c46fc05b81a2b09 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 4, 2021 at 2:50 PM Dave Horsfall wrote: > On Mon, 4 Jan 2021, Peter Jeremy wrote: > > > Alternatively, my understanding is that the Unix epoch changed on > > several occasions in the early days. Presumably the knowledge of how to > > achieve this hasn't been lost. (Though actually performing an epoch > > rollover may be more difficult today). > > My understanding is that it's been 1st Jan 1970 since at least Ed5, if not > Ed6. > It's been that way since the 4th edition. In the 3rd edition it was the number of 60Hz ticks since 1972, along with this note: "This guarantees a crisis every 2.26 years." Rebasing the epoch would be... tricky... lots of math is done assuming an origin of 1970, and not all of it is obvious to even concerted analysis. Less ugly would be to declare time_t to be unsigned instead of signed... It would break less code... Making time_t 64 bits also breaks code, even if you declare you don't care about binary compat since many older apps know time_t is 32-bits. Warner --0000000000003c46fc05b81a2b09 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jan 4, 2021 at 2:50 PM Dave H= orsfall <dave@horsfall.org> = wrote:
On Mon, 4= Jan 2021, Peter Jeremy wrote:

> Alternatively, my understanding is that the Unix epoch changed on
> several occasions in the early days.=C2=A0 Presumably the knowledge of= how to
> achieve this hasn't been lost.=C2=A0 (Though actually performing a= n epoch
> rollover may be more difficult today).

My understanding is that it's been 1st Jan 1970 since at least Ed5, if = not
Ed6.

It's been that way since the 4= th edition.

In the 3rd edition it was the number o= f 60Hz ticks since 1972, along with this note: "This guarantees a cris= is every 2.26 years."

Rebasing the epoch woul= d be...=C2=A0 tricky... lots of math is done assuming an origin of 1970, an= d not all of it is obvious to even concerted analysis.

=
Less ugly would be to declare time_t to be unsigned instead of signed.= ..=C2=A0 It would break less code... Making time_t 64 bits also breaks code= , even if you declare you don't care about binary compat since many old= er apps know time_t is 32-bits.

Warner
=
--0000000000003c46fc05b81a2b09--