From owner-svn-src-all@freebsd.org Sun Aug 5 14:22:49 2018 Return-Path: Delivered-To: svn-src-all@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 8E4241054255 for ; Sun, 5 Aug 2018 14:22:49 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 172F691284 for ; Sun, 5 Aug 2018 14:22:48 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 01b49d23-98bb-11e8-93fa-f3ebd9db2b94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 01b49d23-98bb-11e8-93fa-f3ebd9db2b94; Sun, 05 Aug 2018 14:22:40 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w75EMcJo048329; Sun, 5 Aug 2018 08:22:38 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1533478958.9860.18.camel@freebsd.org> Subject: Re: svn commit: r337334 - head/lib/libc/sys From: Ian Lepore To: Warner Losh , "Rodney W. Grimes" Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 05 Aug 2018 08:22:38 -0600 In-Reply-To: References: <201808042208.w74M8OmD057603@repo.freebsd.org> <201808042224.w74MOgLi095274@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2018 14:22:49 -0000 On Sat, 2018-08-04 at 16:39 -0600, Warner Losh wrote: > On Sat, Aug 4, 2018 at 4:24 PM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > > > > > > Author: cem > > > Date: Sat Aug  4 22:08:24 2018 > > > New Revision: 337334 > > > URL: https://svnweb.freebsd.org/changeset/base/337334 > > > > > > Log: > > >   settimeofday(2): Remove stale note about timezone > > > > > >   Contrary to the removed comment, the kernel does appear to use the > > timezone > > > > > >   argument of settimeofday.  The comment dates to the BSD4.4 import; I > > assume it > > > > > >   is just stale. > > In what way is the kernel using TZ?   It shouldn't be. > > Or is it using the TZ to adjust the passed in time to UTC/GMT, > > which I would of thought is done before calling settimeofday. > > Specifically, for compatibility, we store minutes west of UTC on > settimeofday and we retrieve it for settimeofday. Otherwise it's 100% > unused by anything else at all in the system. Well, technically, we use it > for utc_offset, we don't really use that elsewhere (one can find references > in utc_offset, but usually we set this via adjkerntz, which is actively > used in the system). tz_minuteswest likely should just be removed, and the > argument to settimzeofday should just be completely ignored. > utc_offset is used by all RTC drivers, and by the convenience routines that convert times to/from FAT filesystem format (which I assume are used by FAT filesystem code, but I haven't checked that). So if the tz info passed to settimeofday() ends up in utc_offset, how can we be sure nobody is relying on that? > One could test it with date -t, nothing does that today. That should be > removed also. Likewise date -d. > > So while hyper technically, one could use this, nobody does, nor has since > between 4.3 and 4.4 when it was realized that storing the timezone in the > kernel was a really stupid idea. That's what the language used in the man > page that you removed was trying to say. > > Warner > > > > > > > > > > Modified: > > >   head/lib/libc/sys/gettimeofday.2 > > > > > > Modified: head/lib/libc/sys/gettimeofday.2 > > > ============================================================ > > ================== > > > > > > --- head/lib/libc/sys/gettimeofday.2  Sat Aug  4 21:57:17 2018 > > (r337333) > > > > > > +++ head/lib/libc/sys/gettimeofday.2  Sat Aug  4 22:08:24 2018 > > (r337334) > > > > > > @@ -28,7 +28,7 @@ > > >  .\"     @(#)gettimeofday.2   8.2 (Berkeley) 5/26/95 > > >  .\" $FreeBSD$ > > >  .\" > > > -.Dd December 27, 2015 > > > +.Dd August 4, 2018 > > >  .Dt GETTIMEOFDAY 2 > > >  .Os > > >  .Sh NAME > > > @@ -44,11 +44,6 @@ > > >  .Ft int > > >  .Fn settimeofday "const struct timeval *tp" "const struct timezone *tzp" > > >  .Sh DESCRIPTION > > > -.Bf -symbolic > > > -Note: timezone is no longer used; this information is kept outside > > > -the kernel. > > > -.Ef > > > -.Pp > > >  The system's notion of the current Greenwich time and the current time > > >  zone is obtained with the > > >  .Fn gettimeofday > > > > > > > > -- > > Rod Grimes > > rgrimes@freebsd.org > > > >