Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Nov 1997 07:32:16 -0500 (EST)
From:      Rob Miracle <rwm@MPGN.COM>
To:        bradh@iafrica.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Year 2000 Compliance of FreeBSD
Message-ID:  <199711081232.HAA17146@Central.KeyWest.MPGN.COM>
In-Reply-To: <Pine.BSF.3.96.971108121101.15958A-100000@spiral.new.co.za> from "Brad Hendrickse" at Nov 8, 97 12:21:03 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> ---] 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711081232.HAA17146>