From owner-freebsd-doc@freebsd.org Wed Aug 30 06:19:16 2017 Return-Path: Delivered-To: freebsd-doc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B914FDF048D for ; Wed, 30 Aug 2017 06:19:16 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B32E84FA0 for ; Wed, 30 Aug 2017 06:19:15 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from Ticonderoga.HML3.ScaleEngine.net (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id A447113C35 for ; Wed, 30 Aug 2017 06:19:09 +0000 (UTC) Subject: Re: FAQ section 10.17 : I cannot change the time on my system by more than one second! How do I get around this? To: freebsd-doc@freebsd.org References: From: Allan Jude Message-ID: Date: Wed, 30 Aug 2017 02:22:10 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 06:19:16 -0000 On 08/30/2017 05:37, Tarjei Jensen wrote: > Hi, > > Changing the time can be done by root executing /usr/sbin/ntpd. It will > depend on the /etc/ntp.conf file having functioning ntp servers. > > ntpd -n -g -g > > will set the time and not fork (-n option). It logs to stdout or stderr and > this output can be seen by the user. When the time and date is ok, use ^C > to stop the program. > > This command can be necessary with all computers that don't have a real > time clock. e.g. The Raspberry PI computers. It may be worthwhile for > owners to modify the startup script to start the ntpd daemon with the -g -g > options as standard. > > This is done by adding or modifying the ntpd_flags variable : in > /etc/rc.d/ntpd > > > The long term solution is to make sure ntpd is running as a daemon by > modifying the /etc/rc.conf file and adding > > ntpd_enable="YES" > > ntpd can then be started on the command line with the command > > service ntpd start > > > Greetings, > _______________________________________________ > freebsd-doc@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-doc > To unsubscribe, send any mail to "freebsd-doc-unsubscribe@freebsd.org" > That FAQ entry is about a different topic. The limit for ntpd is 1000 seconds, but yes, will cause problems for Raspberry Pi and other devices that cannot remember their clock. The setting you are most likely looking for is: ntpd_sync_on_start="YES" in /etc/rc.conf, which adds the -g flag to ntpd. -- Allan Jude