Subject: Re: syntax ideas solicited
To: Gavan Fantom <gavan@coolfactor.org>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 12/25/2001 01:12:11
>My laptop has been up since January, when I brought it back into the
>country, and changed /etc/localtime back to its usual setting. OK, I
>arguably should have restarted cron after doing that, but it would have
>been nice of cron to notice at some point in the last 11 and a half months
>that it's now running in a different timezone to where it thought it was
>when it started. :)

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.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."