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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2450 invoked from network); 16 Feb 2023 15:36:34 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 16 Feb 2023 15:36:34 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 0D5AF41CA5; Fri, 17 Feb 2023 01:36:29 +1000 (AEST) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by minnie.tuhs.org (Postfix) with ESMTPS id CDFD541C9E for ; Fri, 17 Feb 2023 01:36:21 +1000 (AEST) Received: by mail-ed1-x533.google.com with SMTP id t16so4272503edd.10 for ; Thu, 16 Feb 2023 07:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Gnam7DpnPznv6lB/l5h55TP6jffcQX1qbKGXjgtuV2I=; b=2aPrfhBRJpiwHsY4ZXN9s43I4Qi3z5Vq1aG1k9+ivuM5QtV6NhisLwKYCK/jFjrdj8 hzCOZrWoeyF8duH9v8TMucij89Q6w0HwNxexXeCKQr0pHTH4ie24JxxbCYkHgersbVH7 SPoMCoFNQaxnD5eqV1CcIGj1a5/6ehnJAJQ3Fej0oCBn/JNdm9SkXGmvWEUx1cMEL8bj EAKOszBGVw07bWwE1ujEXpmrBO4pErpJU5a9/hpexsIKI47aRzfXsdknMArTX5dIPp7c 0g8Egj33yo/G//jcxw89TwPT9xxKeyM6FADgfao1u5Ox78y9NjOG0prDrr153Q2LxDBz NXYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Gnam7DpnPznv6lB/l5h55TP6jffcQX1qbKGXjgtuV2I=; b=WWoLRlCQAhbu69KEfmPnOjdyhQR8P6QMVO7cPe7PIR8QIaPaeAMJ9lTGrqT2tohqmq AeE4T5ku9sNelVEHLoqGWWT/Cim2C/b97kSY5EXFpA+1Tor2m5UphhCp75dR3/pSCT1E U//q4SllAOdjiCodpWyOCnyrBqHTgru0xSVsbdpu9f+E8kckR4Czu+sxsgXev7uTmAk8 tnB8lYIadqdnHUEAc2xBIz/LLqvWKEbR1AHUcsUVMk2gj8r863rdllEnV1ZjsVyDQvC3 cug+DhlX5BefGkQQfYyyficTcH+83jv3vmPNV5OpHUcVLL12aL0/wONi8bhieUi+VMpU pnsQ== X-Gm-Message-State: AO0yUKX/neDL/gk/5ac3TsEgengeh4mHDvUx6XZ1FUeITCzyctdpkZwu 8YB6IadNjZhpqrIi141hc7Gk+GVo8inOM5EesKFa81/CdaNjeBJO X-Google-Smtp-Source: AK7set/4xnqlKfCgvKWF8621OnrzUqlnH46GuBKmmZF3gT9byM82LzvNjx1VR5rvgd0b0tLZ06+RVaNUBCg37eyTqsQ= X-Received: by 2002:a50:cc97:0:b0:4ac:b442:5a4b with SMTP id q23-20020a50cc97000000b004acb4425a4bmr3245120edi.0.1676561779804; Thu, 16 Feb 2023 07:36:19 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Thu, 16 Feb 2023 08:36:23 -0700 Message-ID: To: KenUnix Content-Type: multipart/alternative; boundary="000000000000545d4d05f4d2f595" Message-ID-Hash: 5TS54ACY7RYNXXFAIGO6RM36SCO7INW6 X-Message-ID-Hash: 5TS54ACY7RYNXXFAIGO6RM36SCO7INW6 X-MailFrom: wlosh@bsdimp.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: tuhs@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Unix V7 updates List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000545d4d05f4d2f595 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Several different people have made them. I grabbed V7 date and added the canonical hack to have years < 70 be 20xx and built it on my Venix box. I've not done an extensive audit, but it's the only thing I've noticed= . Warner P.S. It's short: commit 25485e099491fd1ae867c26043a798e47f7983ad Author: Warner Losh Date: Thu Nov 15 23:51:59 2018 -0700 Apply Y2K fix to date Treat all two digit dates < 70 as 20xx and >=3D 70 as 19xx. diff --git a/src/cmd/date.c b/src/cmd/date.c index a005765..643f7e7 100644 --- a/src/cmd/date.c +++ b/src/cmd/date.c @@ -133,7 +133,10 @@ gtime() if (hour<0 || hour>23) return(1); timbuf =3D 0; - year +=3D 1900; + if (year < 70) + year +=3D 2000; + else + year +=3D 1900; for(i=3D1970; i wrote: > I was wondering if there are any fixes for Unix V7 to > use years beyond 2000? > > -- > WWL =F0=9F=93=9A > > > --000000000000545d4d05f4d2f595 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Several different people have made them. I grabbed V7= date and added
the canonical hack to have years < 70 be 20xx = and built it on my Venix
box. I've not done an extensive audi= t, but it's the only thing I've noticed.

Warner

P.S. It's short:

commit 25485e099491fd1ae867c26043a798e47f7983ad
Author: Warner Los= h <imp@freebsd.org>
Date: = =C2=A0 Thu Nov 15 23:51:59 2018 -0700

=C2=A0 =C2=A0 Apply Y2K fix to= date
=C2=A0 =C2=A0
=C2=A0 =C2=A0 Treat all two digit dates < 70 = as 20xx and >=3D 70 as 19xx.

diff --git a/src/cmd/date.c b/src/cm= d/date.c
index a005765..643f7e7 100644
--- a/src/cmd/date.c
+++ b/= src/cmd/date.c
@@ -133,7 +133,10 @@ gtime()
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 if (hour<0 || hour>23)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 return(1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 timbuf =3D 0;- =C2=A0 =C2=A0 =C2=A0 year +=3D 1900;
+ =C2=A0 =C2=A0 =C2=A0 if (year= < 70)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 year +=3D 2= 000;
+ =C2=A0 =C2=A0 =C2=A0 else
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 year +=3D 1900;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 for(i=3D1970;= i<year; i++)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= timbuf +=3D dysize(i);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Leap year */
<= /div>

On Thu, Feb 16, 2023 at 7:14 AM KenUnix <ken.unix.guy@gmail.com> wrote:
I was wondering= if there are any fixes for Unix V7 to
use years beyond 2000?
=

--
WWL= =F0=9F=93=9A


--000000000000545d4d05f4d2f595--