Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Dec 2017 11:20:27 +0100
From:      "Michael Ross" <gmx@ross.cx>
To:        FreeBSD <freebsd-questions@freebsd.org>, "Remy Zandwijk" <remy@luckyhands.nl>
Subject:   Re: tzsetup without menu?
Message-ID:  <op.zapwcd09g7njmm@workstation>
In-Reply-To: <FAEB7D50-F137-4A8D-AE3C-6D1CF8FC98DF@luckyhands.nl>
References:  <776CD363-26A1-4628-B21E-2CA266609BAE@luckyhands.nl> <op.zapvf6nzg7njmm@workstation> <FAEB7D50-F137-4A8D-AE3C-6D1CF8FC98DF@luckyhands.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Am .12.2017, 11:09 Uhr, schrieb Remy Zandwijk <remy@luckyhands.nl>:

>>> The tzsetup manual page on 11.1-RELEASE-p4 says:
>>>
>>>    It is possible to short-circuit the menu system by specifying the
>>>    location of a zoneinfo_file or the name of the zoneinfo_name on the
>>>    command line; this is intended mainly for pre-configured  
>>> installation
>>>    scripts or people who know which zoneinfo they want to install.
>>>
>>>
>>> However, when I run the command like this, I still get the menu:
>>>
>>>    tzsetup -s /usr/share/zoneinfo/Europe/Amsterdam
>>>
>>>
>>>
>>> Am I doing it wrong or does the tzsetup command not act like  
>>> documented?
>>>
>>>
>>> -Remy
>>>
>>
>> I think you could just copy the zonefile
>>
>> # md5 /usr/share/zoneinfo/Europe/Berlin /etc/localtime
>> MD5 (/usr/share/zoneinfo/Europe/Berlin) =  
>> 4790e83465681cefbf852aed265354bf
>> MD5 (/etc/localtime) = 4790e83465681cefbf852aed265354bf
>>
>>
>> thus
>>
>> cp /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
>> echo "Europe/Amsterdam" > /var/db/zoneinfo
>
> Thanks, that seems to work(around).
>
> But still: either the documentation is wrong or the command has a bug.
>
> -Remy
>

Wait ... this wouldn't adjust the clock, and ignore UTC setting  
/etc/wall_cmos_clock

better:
echo "Europe/Amsterdam" > /var/db/zoneinfo
touch /etc/wall_cmos_clock  # if clock is set to local time
tzsetup -r


The documentation is not wrong.
"Skip the initial question about adjusting the clock if not set to UTC"
so it just skips the UTC question





 



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