Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Aug 2018 00:01:15 +0100
From:      Warner Losh <imp@bsdimp.com>
To:        "Conrad E. Meyer" <cem@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r337334 - head/lib/libc/sys
Message-ID:  <CANCZdfqSiJ0n_pBykO7y7gXmo3LA1ai5G_ZzJQ_M712f5rAbBQ@mail.gmail.com>
In-Reply-To: <CAG6CVpU9Rp7Rav8yGZ_2VDvrwyc-jFRNRYvgtemYO3n2MDzTjQ@mail.gmail.com>
References:  <201808042208.w74M8OmD057603@repo.freebsd.org> <CANCZdfo1g_j=RibNv6xb2UC8LvqzcobKHjdUo7%2B9CQdbCa5uXA@mail.gmail.com> <CAG6CVpU9Rp7Rav8yGZ_2VDvrwyc-jFRNRYvgtemYO3n2MDzTjQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 4, 2018, 11:48 PM Conrad Meyer <cem@freebsd.org> wrote:

> If not stale, it was inaccurate as-is.  It seems to be used by a bunch
> of different clock-related drivers and routines, e.g.,
>
> $ rg '(tz_minuteswest|tz_dst|utc_offset)' | wc -l
>       36
>

Right. Nothings sets it any more though and hasn't in 30 years. Adjkerntz
is what is used today. The other code was left for still lingering legacy
uses in the early 1990s...

To me there is a disconnect between that use and "timezone is no
> longer used; this information is kept outside the kernel."
>

Right. It's not used nor set. It was the 4.2 BSD interface...

If you or someone else wants to reword the "unused" note in a more
> nuanced fashion, I'm definitely supportive of that.  (Or remove the
> kernel uses aside from pass-thru for gettimeofday and restore the
> original note, of course.)
>

I'll do it.

I was actually going to deorbit the date(1) -t/-d options on the basis
> of the settimeofday manual page note until I did the due diligence to
> verify it was actually unused, and discovered that not to be true.
>

We should do that. This code has not been relevant in decades.

Warner

All the best,
> Conrad
>
>
>
> On Sat, Aug 4, 2018 at 3:15 PM, Warner Losh <imp@bsdimp.com> wrote:
> > How is this stale? It said it unused, and now it doesn't say this are is
> > completely ignored.
> >
> > Warner
> >
> > On Sat, Aug 4, 2018, 11:08 PM Conrad Meyer <cem@freebsd.org> 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.
> >>
> >> 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
> >>
> >
>



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