Skip site navigation (1)Skip section navigation (2)
Date:      26 Apr 1998 09:36:43 -0500
From:      Dave Marquardt <marquard@zilker.net>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: Year 2000 Compliance - localtime?
Message-ID:  <85vhrwir9g.fsf@localhost.zilker.net>
In-Reply-To: Karl Pielorz's message of "Sun, 26 Apr 1998 12:09:48 %2B0100"
References:  <354315FC.7532C42D@tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Karl Pielorz <kpielorz@tdx.co.uk> writes:
> 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...

So print tm_year+1900 and you'll be fine....

-Dave

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?85vhrwir9g.fsf>