From owner-freebsd-bugs Sun Jul 2 12:39:58 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA08180 for bugs-outgoing; Sun, 2 Jul 1995 12:39:58 -0700 Received: from mpp.com (mpp.Minn.Net [204.157.201.242]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id MAA08174 for ; Sun, 2 Jul 1995 12:39:55 -0700 Received: (from mpp@localhost) by mpp.com (8.6.11/8.6.9) id OAA02015 for freebsd-bugs@freebsd.org; Sun, 2 Jul 1995 14:39:54 -0500 From: Mike Pritchard Message-Id: <199507021939.OAA02015@mpp.com> Subject: Re: bin/274 touch -t with century doesn't work To: freebsd-bugs@freebsd.org Date: Sun, 2 Jul 1995 14:39:53 -0500 (CDT) In-Reply-To: from "root@hclb.demon.co.uk" at Mar 27, 95 09:46:00 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 889 Sender: bugs-owner@freebsd.org Precedence: bulk > >Number: 274 > >Synopsis: touch -t with century doesn't work > >Description: > > The command: > > touch -t 199504011200 testfile > > gives the error message: > > touch: out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS] Here is a patch to fix this problem. *** orig/touch.c Sun Jul 2 14:25:55 1995 --- touch.c Sun Jul 2 14:30:36 1995 *************** *** 204,210 **** switch(strlen(arg)) { case 12: /* CCYYMMDDhhmm */ t->tm_year = ATOI2(arg); ! t->tm_year *= 1000; yearset = 1; /* FALLTHOUGH */ case 10: /* YYMMDDhhmm */ --- 204,210 ---- switch(strlen(arg)) { case 12: /* CCYYMMDDhhmm */ t->tm_year = ATOI2(arg); ! t->tm_year *= 100; yearset = 1; /* FALLTHOUGH */ case 10: /* YYMMDDhhmm */ -- Mike Pritchard mpp@legarto.minn.net "Go that way. Really fast. If something gets in your way, turn"