Subject: Re: timestamp on DHCP log entries
To: rgf <rgfisch@excite.com>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 03/04/2004 15:03:11
On Thu, 4 Mar 2004, rgf wrote:
> Thanks Jeremy,I've got my system time in GMT and /etc/localtime is a
> soft link to: /usr/share/zoneinfo/America/Los_Angeles
That means America/Los_Angeles is your system time zone.
> Where should I set the environment variable TZ so that it's seen by the
> system instead of just my shell? "/.cshrc"?
I am not sure why. /etc/localtime is for the system.
> Or should I set the variable in /etc/rc.d/dhclient?
Looking closer .. I don't think this can be fixed without programming in
new code.
It appears that dhclient must be ignoring the timezone.
The ISC dhclient code appears to use gettimeofday(3) which is always UTC.
(It doesn't use ctime(3) or localtime(3).)
syslog(3) (according to /usr/src/lib/libc/gen/syslog.c) uses the timezone,
but I don't know why dhclient which uses syslog(3) doesn't.
Jeremy C. Reed
http://bsd.reedmedia.net/