Subject: Re: syntax ideas solicited
To: Simon Burge <>
From: Andrew Brown <>
List: tech-userlevel
Date: 12/26/2001 23:05:39
>> it seems to me, from perusing the cron code and libc/time/localtime.c
>> a little, that if cron did this:
>> 	struct tm *tm;
>> 	...
>> 	putenv("TZ=UTC");
>> 	localtime(&TargetTime);
>> 	unsetenv("TZ");
>> 	tm = localtime(&TargetTime);
>> instead of
>> 	struct tm *tm = localtime(&TargetTime);
>> at the top of cron_tick(), you might be able to get what you want.
>> unless, of course, you've run cron with TZ already set to something.
>> then again, changing the above to deal with that ought to be
>> relatively trivial.
>Note that repeated calls to {put,set}env() can result in a memory leak
>because setenv() calls malloc() and realloc()...

that's a shame, because other than tweaking the presence of the TZ
environment variable, i see no other way of convincing the tz code to
"reinitizlize" itself.  :(

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."