Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!pacbell.com!ames!haven!decuac!hussar.dco.dec.com!mjr From: mjr@hussar.dco.dec.com (Marcus J. Ranum) Newsgroups: comp.mail.uucp Subject: Re: UUCP status files and wierd dates - revisted. Message-ID: <1990Nov27.151512.24352@decuac.dec.com> Date: 27 Nov 90 15:15:12 GMT References: <754@dynasys.UUCP> <1990Nov22.024607.7474@decuac.dec.com> <756@dynasys.UUCP> Sender: news@decuac.dec.com (Network News) Organization: Digital Equipment Corp., Washington Ultrix Resource Center Lines: 39 In article <756@dynasys.UUCP> jessea@dynasys.UUCP () writes: >[...] I really know nothing about this - obviously. >I'm just trying to find out and so far I still haven't had my question >answered. In less than five years we will be calculating a 25 year old >date and the total number will be approxiamately 817314005(approximation >of Nov. 26 1995). How much total resources - both individual systems >and all unix systems put together - would be saved if we only had to >calculate a date using a maximum of approxiamately 31536000 seconds >instead of that astronomical sum above. Would it really make that much >of a difference? very, very, very little difference. dates are stored as an (time_t, really) integer, and conversions are performed mathematically on that value - typically a modulus operation to generate an index into a table of other values such as days of the week. since the value's an integer, you don't even pay the cost of messing with floating point. it's convenient to save the integer value in data files in its integer form - saves space, and it means that if I give you a tape archive of files, both of our machines will be able to interpret that date normalized to a known time and a known timezone, rather than having to perform lots of wasted conversion. your suggestion (as I tried to point out before) would cost *FAR* more in terms of resources to run around re-dating data in files than to keep calculating from a 25 year old date. the computer doesn't care that the date is 25 years old, I don't either, and since most people use reasonably standardized date conversion libraries, they don't have to either. what's your problem, then ? just want some change for the sake of a little change ? mjr. -- Good software will grow smaller and faster as time goes by and the code is improved and features that proved to be less useful are weeded out. [from the programming notebooks of a heretic, 1990]