Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2011 18:49:04 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        Doug Barton <dougb@freebsd.org>
Cc:        hackers@freebsd.org, David Wolfskill <david@catwhisker.org>
Subject:   Re: Keeping /etc/localtime up-to-date
Message-ID:  <102B99D4-7D9B-43D5-9512-58EFA2EFB637@kientzle.com>
In-Reply-To: <4D8F9E9A.50604@FreeBSD.org>
References:  <20110327153835.GA87420@albert.catwhisker.org> <4D8F9E9A.50604@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 27, 2011, at 1:31 PM, Doug Barton wrote:
> On 03/27/2011 08:38, David Wolfskill wrote:
>> So it seems to me that requirements would be:
>> * The content of /etc/localtime must provide the appropriate
>>   "zoneinfo" information, even when/usr/share/zoneinfo/* has been
>>   modified (or shortly thereafter, in concert with "make =
installworld").
>=20
> This is more along the lines of something that would be easy to work =
with in mergemaster. If I can tell what file in /usr/share/zoneinfo to =
compare /etc/localtime to (ideally with fully path), I'm happy to =
provide a mechanism in mergemaster to make sure it stays up to date.


The best fix is to first add the ability for date(1)
to print out the current timezone name.
(E.g., "America/Los_Angeles")  Then it's trivial
for mergemaster to update /etc/localtime; just
ask date(1) for the timezone name and copy
the correct one over /etc/localtime.

Unfortunately, I think it's currently impossible
for date(1) to do this because the zoneinfo
files don't store that information.  This  is the real
reason Solaris uses a symlink; the value of the
symlink gives you the timezone name.

FWIW, mergemaster is not the only program
that would benefit from a canonical way to obtain
the name of the current timezone.

Cheers,

Tim




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?102B99D4-7D9B-43D5-9512-58EFA2EFB637>