Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2005 18:34:11 +1100
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Brett Glass <brett@lariat.org>
Cc:        stable@freebsd.org
Subject:   Re: FreeBSD 6.0 cron is running on GMT
Message-ID:  <20051127073411.GG27757@cirb503493.alcatel.com.au>
In-Reply-To: <6.2.5.6.2.20051126222514.085ac738@lariat.org>
References:  <200511260118.SAA20596@lariat.net> <Pine.LNX.4.53.0511251816200.27754@regurgitate.ugcs.caltech.edu> <6.2.5.6.2.20051126150622.0843d3e0@lariat.org> <20051127041452.GE27757@cirb503493.alcatel.com.au> <6.2.5.6.2.20051126222514.085ac738@lariat.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2005-Nov-26 22:27:49 -0700, Brett Glass wrote:
>I am wondering if I shouldn't just redo everything in the system that
>has to do with time zones and time keeping (deleting files and re-creating
>them if need be), reboot, and see what happens.

That's as good as idea as any other.  I know cron on my 6.0 system
behaves correctly so I suspect it's something odd on your system.

Last suggestions/guesses:
- If you run "/sbin/rcorder -s nostart /etc/rc.d/*", does /etc/rc.d/cron
  come after /etc/rc.d/adjkerntz?
- If /etc/localtime is a symlink, is the filesystem it points to mounted
  when cron starts?  (Look thru the rcorder above to check).
- Do "at" jobs run at local or UTC time?
- If you run "date" and "date -u" as a cron job, what do they report?

> I've never seen a good
>explanation of all of the sysctl variables, environment variables, files,
>etc. that control it, especially since (as I understand it) the responsibility
>has been shifted from the kernel to libraries. Is there a summary out there?

The timezone has always been the responsibility of userland in FreeBSD.
The kernel provides a UTC timestamp to the ctime(3) functions, which
are solely responsible to mapping UTC to local time based on $TZ or
/etc/localtime.

adjkerntz(8) is responsible for handling the RTC's offset between UTC
and localtime.  If /etc/wall_cmos_clock exists, it means that CMOS clock
keeps local time.  If that file does not exist, it means that the CMOS
clock keeps UTC time.  adjkerntz sets machdep.wall_cmos_clock.

-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051127073411.GG27757>