From owner-freebsd-questions@freebsd.org Thu Jun 6 16:35:40 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA70415B8FFE for ; Thu, 6 Jun 2019 16:35:39 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E5FD74DD7 for ; Thu, 6 Jun 2019 16:35:39 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: matthew/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4973BD714 for ; Thu, 6 Jun 2019 16:35:39 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from leaf.local (unknown [88.212.184.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 9508775B for ; Thu, 6 Jun 2019 16:35:36 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk/9508775B; dkim=none; dkim-atps=neutral Subject: Re: ntpd configutration -- a small suggestion from the peanut gallery To: freebsd-questions@freebsd.org References: <52339.1559763722@segfault.tristatelogic.com> From: Matthew Seaman Message-ID: <1e1c3403-fa5e-b540-e7b5-5b88af234947@FreeBSD.org> Date: Thu, 6 Jun 2019 17:35:35 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <52339.1559763722@segfault.tristatelogic.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 8E5FD74DD7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jun 2019 16:35:40 -0000 On 05/06/2019 20:42, Ronald F. Guilmette wrote: >> Anyway, even if it seems to work now, I'd check if your time is based on localtime or >> GMT. It's recommended to use GMT, I never use localtime personally. > For me, I prefer local time. When I type "date" I don't really give a > flying fig what time it is in London. I'm in California. That's not actually the effect removing /etc/wall_cmos_clock has. Without /etc/wall_cmos_clock, the internal system clock is simply synchronized to the cmos clock at boot, and the cmos clock is synched back from the system clock at intervals when the system is running and on shutdown. The cmos clock is the small, fairly cheap but not astonishingly accurate clock that runs off the battery on your motherboard, even when your machine is completely unplugged from the power, while the system clock is the kernel's idea of the current time based on a rather more accurate reference frequency generated from a quartz crystal resonator -- and that depends on the system being up and running to function. Now, Unix-oid systems generally run their system clock in UTC. They then calculate the time-of-day you see displayed in your shell by applying the appropriate offset calculated from the timezone setting -- either derived from /etc/localtime or from setting TZ in your environment. Windows runs the system clock as the local wall clock time -- or at least, it used to. No idea if that's still the case or not. The advantage of the Unix way is that each different user, or even each different process, can easily run with a different timezone setting. The effect of /etc/wall_cmos_clock is to tell the kernel to apply the timezone offset when it either updates the cmos clock, or updates the system clock from it. Basically it's a hack to support dual-booting between Windows and FreeBSD, and if you never want to do that then your best choice is simply to keep cmos and system clocks synchronized on UTC so that there's no offset to calculate. Cheers, Matthew