Date: Sun, 2 Jul 1995 14:39:53 -0500 (CDT) From: Mike Pritchard <mpp@legarto.minn.net> To: freebsd-bugs@freebsd.org Subject: Re: bin/274 touch -t with century doesn't work Message-ID: <199507021939.OAA02015@mpp.com> In-Reply-To: <m0rtLft-000B6FC@hclb.demon.co.uk> from "root@hclb.demon.co.uk" at Mar 27, 95 09:46:00 pm
index | next in thread | previous in thread | raw e-mail
> >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"
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507021939.OAA02015>
