From owner-freebsd-questions Sat Nov 8 04:34:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA05868 for questions-outgoing; Sat, 8 Nov 1997 04:34:54 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from Central.KeyWest.MPGN.COM (Central.TanSoft.COM [208.194.145.1]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id EAA05862 for ; Sat, 8 Nov 1997 04:34:51 -0800 (PST) (envelope-from rwm@MPGN.COM) Received: (from rwm@localhost) by Central.KeyWest.MPGN.COM (8.6.9/8.6.9) id HAA17146; Sat, 8 Nov 1997 07:32:17 -0500 From: Rob Miracle Message-Id: <199711081232.HAA17146@Central.KeyWest.MPGN.COM> Subject: Re: Year 2000 Compliance of FreeBSD To: bradh@iafrica.com Date: Sat, 8 Nov 1997 07:32:16 -0500 (EST) Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: from "Brad Hendrickse" at Nov 8, 97 12:21:03 pm X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > ---] SNIP [--- > > number of seconds elapsed since January 1, 1970? What type of problems > > will we face when the date rolls over to Year 2000? I couldn't find the > > None. No problems until 2038 sometime... But by then we would have (at > least) 64-bit machines :) Actually there are potential problems. The reason I say potential is that they are would effect custom software. The biggest problem comes from the use of localtime(). If a programmer uses the tm->year field from them tm structure, they are left with a value (year-1900). If a programmer uses that to display a 2 digit field, then in year 2000, a 100 will be returned. Depending on the formating options to printf() (or however) you could end up with a date that looks like: 1/1/100 or 1/1/10 If the programmers alwasy view time as elapsed seconds since 1/1/1970 then there wont be problems in comparisons, but the display and print issues are real. Also the "date" command may return the wrong year (I haven't poured over the source) on certian format options like %D, and %Y. Shell scripts which depend on date might have problems. FreeBSD it's self shouldn't have problems, but third party programs need to make sure they will be ok. As an example, we were developing a billing system and the programmers wanted to store dates as yy/mm/dd for sorting purposes. We nixed that in a hurry and mandated that they store things as elapsed seconds since 1/1/1970 so we wouldn't have a year 2000 problem. To these programmers, one an ex-database dude working on IBM mainfraims, doing dates as yy/mm/dd was just the natural thing to do. So we need to look at our software any way to see just what will happen. Rob -- Rob Miracle rwm@mpgn.com