Date: Fri, 15 Jan 1999 17:52:20 +1030 From: Greg Lehey <grog@lemis.com> To: Dan Langille <junkmale@xtra.co.nz> Cc: imp@village.org, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.sbin/tcpdump/tcpslice tcpslice.c Message-ID: <19990115175220.O55525@freebie.lemis.com> In-Reply-To: <19990115071343.FIZH678125.mta2-rme@wocker>; from Dan Langille on Fri, Jan 15, 1999 at 08:12:55PM %2B1300 References: <199901150649.XAA21928@harmony.village.org>; <19990115173053.N55525@freebie.lemis.com> <19990115071343.FIZH678125.mta2-rme@wocker>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, 15 January 1999 at 20:12:55 +1300, Dan Langille wrote: > On 15 Jan 99, at 17:30, Greg Lehey wrote: > >> On Thursday, 14 January 1999 at 23:49:43 -0700, Warner Losh wrote: >>> In message <19990115170933.L55525@freebie.lemis.com> Greg Lehey writes: >>> : I thought there was some guideline that small 2-digit years represent >>> : 20xx, and large 2-digit years represent 19xx. >>> >>> The short answer is that it depends. I think that w/o reading the >>> file that tcpslice is looking at it would be hard to know for sure >>> which year to use. So I made an arbitrary choice that made the >>> behavior well defined. > > About a year ago I did some work for New Zealand Fire Service regarding > Y2K issues. During that time I was exposed to the British Standards > Institution Y2K standards. I stole the following from > http://www.bsi.org.uk/bsi/disc/year2000/2000.html: > > THE DEFINITION > Year 2000 conformity shall mean that neither performance nor functionality > is affected by dates prior to, during and after the year 2000. > In particular: > Rule 1 No value for current date will cause any interruption in > operation. > Rule 2 Date-based functionality must behave consistently for > dates prior to, during and after year 2000. > Rule 3 In all interfaces and data storage, the century in any date > must be specified either explicitly or by unambiguous > algorithms or inferencing rules. > Rule 4 Year 2000 must be recognized as a leap year. > > According to Rule 3, the code as it stands, is, IMHO, Y2K compliant. I've just found another page, from XOpen: http://www.UNIX-systems.org/version2/whatsnew/year2000.html. It defines the 68/69 split, though it's not overly adamant about it. >>> Two digit dates generally have been interpreted as meaning in the >>> century that context says they are in. I suppose that I could have >>> figured out what year it was and made that year the "pivot" year. For >>> example, right now 1999 is the pivot year. 1999 + 50 is 2049 and 1999 - >>> 49 is 1950, so any number >= 50 means 19xx, while any number < 50 means >>> 20xx. In 2001 the pivot is 52, 2009 the pivot is 60, etc. You can >>> quibble over the edge cases I'm sure. >>> >>> Some have proposed that single digits < 38 mean 20xx and > 38 mean >>> 19xx, but that isn't a good long term solution.... >>> >>> If you have a better suggestion, please let me know, or commit better >>> patches. :-) > > The above is one approach. Many places take different approaches each > according to their needs. > >> Given the mass hysteria that seems to be building up to the turn of >> the century, I'm quite happy to let you do it :-) > > Yeah. I've been sent some stuff by political activists claiming that Y2K > is a reason to get back to the land and reduce our dependency on > technology. I, for one, will be not be leaving the country. Nor I. I'm already on the land, have my own water supply, potentially own food supply :-) Nothing to do with Y2K, of course. >> If you look at http://www.eunet.pt/ano2000/sun/sup_sun5.htm, you'll >> see that Sun uses a pivot date of 68 (i.e. two-digit years range >> between 1969 and 2068). I'm assuming that they have some reason to >> choose this particular number, and that others will do the same. >> There's also more stuff at http://www.sun.com/y2000/index.html, but I >> haven't looked at it much. There is, however, a guide at >> http://www.sun.com/y2000/devguide.html, which looks well worth reading. >> You might be interested in this: >> >> If a two-digit year representation is necessary, define 00-68 as >> 2000-2068 and 69-99 as 1969-1999. > > > This too is a good strategy. But they all achieve the same thing. > Conformaty with Rule 3. I think that, all else being equal, the fact that other UNIX systems are going this way should be a reason for us to do it too. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990115175220.O55525>