Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1.chuqui 4/7/84; site voder.UUCP
Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!hplabs!nsc!voder!jeff
From: jeff@voder.UUCP (Jeff Gilliam)
Newsgroups: net.bugs.4bsd
Subject: ctime(3) broken in 4.2 release
Message-ID: <297@voder.UUCP>
Date: Fri, 3-Aug-84 17:04:37 EDT
Article-I.D.: voder.297
Posted: Fri Aug  3 17:04:37 1984
Date-Received: Sun, 5-Aug-84 05:46:35 EDT
Organization: National Semiconductor, Santa Clara
Lines: 30

Index:	lib/libc/gen/ctime.c 4.2BSD Fix

Description:
	The ctime(3) function is broken in the 4.2 BSD release.
	Sometime after the 4.1 release someone changed all the 'long'
	variables in ctime.c to 'unsigned long'.  This is *wrong*.
	At the UNIX epoch (Jan 1 00:00:00 1970 GMT) local time is
	*negative*.

Repeat-By:
	Mount a level 0 dump tape.  Type 'restore t'.  If your system
	has the bug you will see output similar to:

		Dump   date: Fri Aug  3 13:23:12 1984
		Dumped from: Sat Feb  5 22:28:16 206	<<< ???
			.
			.
			.
Fix:
	To correct, simply edit ctime.c and change every 'unsigned
	long' to 'long', recompile, and add the corrected binary to
	libc.a.  Don't forget to do a ranlib on libc.a afterward.
	Finally, recompile restore and install.

	(As an aside, assuming longs are 32 bits, the return to
	signed numbers still allows keeping time correctly until
	2038.)

-- 
Jeff Gilliam	{ucbvax,ihnp4!nsc}!voder!jeff