Date: 26 Apr 1998 16:26:42 +0200 From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) To: Karl Pielorz <kpielorz@tdx.co.uk> Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: Year 2000 Compliance - localtime? Message-ID: <xzpu37g4q1p.fsf@gnipahellir.ifi.uio.no> 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: > 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... > > Is this right? - or are there some better functions or something I should be > using? Yes, this is right. If you check with your pocket calculator, I think you'll find 1900 was 98 years ago. tm_year will be 100 in year 2000. -- Noone else has a .sig like this one. 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?xzpu37g4q1p.fsf>