return from DST did not worked

Matthew Seaman matthew at FreeBSD.org
Mon Oct 31 07:52:25 UTC 2016


On 31/10/2016 01:02, RW via freebsd-questions wrote:
> On Sun, 30 Oct 2016 22:20:01 +0100
> Matthias Apitz wrote:
> 
>> Hello,
>>
>> We in Europe returned this night from DST CEST. In the night, when my
>> system FreeBSD 11.0-CURRENT r292778 (amd64)
>> was down, all the clocks were set back from 03:00 (CEST) to 02:00
>> (CET). When I booted my system the date(1) command was showing
>> correctly string 'CET' but the wrong hour, still the one hour ahead,
>> until I run ntpdate(8),
> 
> Do you keep your bios/cmos clock set to local time? The installer
> creates a file /etc/wall_cmos_clock as a flag if you set it up this way.
> 
> The normal setup is to keep the bios clock on UTC, and then FreeBSD
> works out the local time - including DST. But if you run on local time
> I don't think FreeBSD handles DST in the cmos clock because that mode
> is intended for dual-booting.

Matthias is correct that having the BIOS clock a.k.a. the CMOS clock
running UTC is the preferred setting, but even if you don't the system
will still track daylight savings time changes for you.

There's a cronjob in /etc/crontab that runs adjkerntz(8).  That should
get run every half hour between midnight and 5.00am each night, which
will detect that it needs to update the CMOS clock on the two occasions
each year when the clocks change...

If the OP doesn't leave his system running overnight, then that will not
happen, and the time will get set an hour out on reboot in the morning.
If this is what happened, then it should suffice to set the kernel clock
to the correct time (ie. turn off ntpd(8), use date(1) to get the clock
within a few seconds of correct, start ntpd(8) and leave it to synch
properly, then run 'adjkerntz -a')

adjkerntz(8) also should get run as a daemon at system boot if your
system is set to use local CMOS time, which sets the kernel clock from
the CMOS clock at bootup, and sets the CMOS clock from the kernel clock
on shutdown.

	Cheers,

	Matthew



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20161031/8bc1dadf/attachment.sig>


More information about the freebsd-questions mailing list