Path: utzoo!mnetor!uunet!mcvax!enea!erix!per From: per@erix.UUCP (Per Hedeland) Newsgroups: comp.bugs.4bsd Subject: Questionable optimization of localtime(3) in 4.3BSD? Message-ID: <1570@erix.UUCP> Date: 1 Mar 88 11:19:15 GMT Reply-To: per@erix.UUCP (Per Hedeland) Organization: Ericsson Telecom, Stockholm, Sweden Lines: 14 Between 4.2 and 4.3, localtime(3) was optimized by giving it a "memory", so it wouldn't have to gettimeofday(2) to obtain the timezone info on each call. However, one result of this is that /usr/ucb/lisp as distributed will always give the time in LBT (Local Berkeley Time). Of course, remaking it "solves" the problem by hardwiring in one's own local timezone. I gather that this behaviour is essentially unchanged by the new ctime package posted to .ucb-fixes. Is there a "good" solution to this problem? I guess the simplest way out is just to decree that packages creating executables by dumping mustn't call localtime/ctime before the dump... Yours for side-effect-free functions :-) Per Hedeland per@erix.ericsson.se or ...{mcvax,uunet}!enea!erix!per