gettimeofday()

n paul at unisoft.UUCP
Sun May 1 16:39:29 AEST 1988


In article <51320 at sun.uucp> guy at gorodish.Sun.COM (Guy Harris) writes:
>
>1) Could not "gettimeofday()" have a static flag that indicates whether it's
>   called "tzset()" or not, so that only the first call to "gettimeofday()"
>   calls "tzset()"?

actually it ought to read it, maybe not everytime but at least once every 10-15
minutes (think of a server daemon - like CAP aufs etc that runs for potentially
months or years at a time)) just in case the timezone changed (ie those two
times twice a year when the daylight-saving changes)

>
>2) Does not "gettimeofday()" avoid calling "tzset()" at all if "timezone" is

yes ... this is a bug and has been reported to "the proper authorities" along
with the fix ...

>   NULL?  Lots of programs (all the properly-written ones) that call
>   "gettimeofday()" explicitly indicate their disinterest in the timezone

unfortunately there are some out there that don't :-(




		Paul
-- 
Paul Campbell, UniSoft Corp. 6121 Hollis, Emeryville, Ca
	E-mail:		..!{ucbvax,hoptoad}!unisoft!paul  
Nothing here represents the opinions of UniSoft or its employees (except me)
"Nuclear war doesn't prove who's Right, just who's Left" (ABC news 10/13/87)



More information about the Comp.unix.aux mailing list