From owner-freebsd-bugs Wed Jul 10 19:00:03 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id TAA05772 for bugs-outgoing; Wed, 10 Jul 1996 19:00:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id TAA05744; Wed, 10 Jul 1996 19:00:01 -0700 (PDT) Date: Wed, 10 Jul 1996 19:00:01 -0700 (PDT) Message-Id: <199607110200.TAA05744@freefall.freebsd.org> To: freebsd-bugs Cc: From: "Stephen J. Roznowski" Subject: Re: misc/1380: Year 2000 breakage with tm_year Reply-To: "Stephen J. Roznowski" Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR misc/1380; it has been noted by GNATS. From: "Stephen J. Roznowski" To: mpp@freefall.freebsd.org Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: misc/1380: Year 2000 breakage with tm_year Date: Wed, 10 Jul 1996 21:50:52 -0400 > From: Mike Pritchard > Subject: Re: misc/1380: Year 2000 breakage with tm_year > > Stephen J. Roznowski wrote: > > >Description: > > > > Several programs have a hardcoded 19 in responses for the year. > > This will break in 4 years... > > [...] > > --- 1467,1474 ---- > > struct tm *gmtime(); > > t = gmtime(&stbuf.st_mtime); > > reply(213, > > ! "%04d%02d%02d%02d%02d%02d", > > ! 1900+t->tm_year, t->tm_mon+1, t->tm_mday, > > Isn't there a TM_YEAR_BASE symbol defined somewhere that should > be used instead of a hardcoded 1900? When I submitted my original changes to NetBSD, I used that symbol; however, according to "J.T. Conklin " the definition of the tm_year field is "years since 1900" according to Standard C. [and not years since TM_YEAR_BASE] -SR