Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Apr 1998 07:51:43 -0600
From:      Michael Fuhr <mfuhr@dimensional.com>
To:        Karl Pielorz <kpielorz@tdx.co.uk>
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: Year 2000 Compliance - localtime?
Message-ID:  <19980426075143.33590@dimensional.com>
In-Reply-To: <354315FC.7532C42D@tdx.co.uk>; from Karl Pielorz on Sun, Apr 26, 1998 at 12:09:48PM %2B0100
References:  <354315FC.7532C42D@tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 26, 1998 at 12:09:48PM +0100, Karl Pielorz wrote:

> I'm writing a program at the moment that does some date manipulation...
> 
> My system is running 3.0-CURRENT as of a few days ago...
> 
> Looking at the 'localtime' function - it returns a 'tm' structure,
> including:
> 
> int tm_year;    /* year - 1900 */
> 
> Printing the contents of the 'tm_year' only gives the last two digits of the
> year, i.e. it returns '98' at the moment...

It doesn't return the last two digits of the year, it returns (year - 1900).
Right now that's 98.  Two years from now it'll be 100.  Try adding two
years to localtime's argument and see what you get.

-- 
Michael Fuhr
http://www.dimensional.com/~mfuhr/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



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