Path: utzoo!attcan!uunet!mcvax!diku!dkuug!ambush!kimcm
From: kimcm@ambush.UUCP (Kim Chr. Madsen)
Newsgroups: comp.sys.att,oli.3b
Subject: ctime(3C) funny on 3b2's
Message-ID: <754@ambush.UUCP>
Date: 11 May 88 08:55:41 GMT
Organization: AmbraSoft A/S (Denmark)
Lines: 23


Some experiments have revealed that there is a small bug (or feature)
in ctime(3C), it interprets its argument as a signed value. Or rather
the problem is that the type time_t is defined to be a signed long,
instead of an unsigned long.

This have the following effect:

	time = 2147480048   ==>  Tue Jan 19 03:14:07 GMT+1 2038
	time = 2147480049   ==>  Fri Dec 13 20:45:52 GMT+1 1901

So, if some of your programs must calculate times 50+ years into the
future don't rely on ctime.  Or you might end up with

			 Friday the 13th MCMI

Regards,

Kim Chr. Madsen, AmbraSoft A/S, Rojelskaer 15, DK-2840 Holte (Denmark)
UUCP: kimcm@ambush.dk, PHONE: +45 2424 111, FAX: +45 2423 090

Your old men shall dream dreams, your young men shall see visions. 
					-- The Bible, Joel, II:28