[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

system/1445: can't use century in touch




>Number:         1445
>Category:       system
>Synopsis:       can't use century in touch
>Confidential:   yes
>Severity:       serious
>Priority:       low
>Responsible:    bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 13 06:30:02 MDT 2000
>Last-Modified:
>Originator:     Peter Strömberg
>Organization:
net
>Release:        2.8-current
>Environment:
	
	System      : OpenBSD 2.8
	Architecture: OpenBSD.i386
	Machine     : i386
>Description:
	The changes in version 1.5 of touch.c doesn't work when you specify a century
>How-To-Repeat:
	touch -t 200001010000 /tmp/filen
	touch: out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]
>Fix:
*** touch.c     Fri Oct 13 14:20:18 2000
--- touch.c.orig        Mon Sep 25 10:24:09 2000
***************
*** 223,229 ****
        case 10:                        /* YYMMDDhhmm */
                if (yearset) {
                        yearset = ATOI2(arg);
!                       t->tm_year += yearset - TM_YEAR_BASE;
                } else {
                        yearset = ATOI2(arg);
                        if (yearset < 69)
--- 223,229 ----
        case 10:                        /* YYMMDDhhmm */
                if (yearset) {
                        yearset = ATOI2(arg);
!                       t->tm_year += yearset;
                } else {
                        yearset = ATOI2(arg);
                        if (yearset < 69)

>Audit-Trail:
>Unformatted: