From owner-svn-src-all@freebsd.org Sat Aug 4 22:39:53 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 007A51056058 for ; Sat, 4 Aug 2018 22:39:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F5F28C456 for ; Sat, 4 Aug 2018 22:39:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x241.google.com with SMTP id h23-v6so13343049ita.5 for ; Sat, 04 Aug 2018 15:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=vyQTfHtxcgMFvYWyj0W4hkX/UHlcTMpRmYMXOSs9kTg=; b=0bKMq2qbcsII+2mkELgOkEGKRN/9k6HSm4RjyNIPjDdcmXnJGmiU58f/usG4iS3wqR vEsIpk4wezIks7F6NmFKMFpKWlHaoCv40M5PJVUdv9LchzF2jwxKMr0Jgji3p0OTLCIN lj9sO890I7oWhnBZdR3QMTcUNbe/EVzYGWZkUZhqTq7AzmgJPaRfs2MPWh4QdEeK/kZ4 EjPMS3royaRSFvorNowGHGgaIsVeteXQuuWtWFnCK0ApnIUxOe52aQ4xh4ajgvVwGthR 4BPczDfQ9CqyIGBtVM1TBBSnthNZZiWGllYoIzYCoOsEt8GdsIxvd99yDejPTiLEtSpd rgfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=vyQTfHtxcgMFvYWyj0W4hkX/UHlcTMpRmYMXOSs9kTg=; b=GPTtdatVlm/3yU3TBIcdlOKoGrB+ijNPbZwvTA9XjRi9oyVr4TdCrfo72MyZKMfYkT 6IXxcaVTp+O7Gs1EIQs8+iBGRcO54d3SivrQGAbSln2CIJhdcW49i5tLFHd0nrqM55tZ /L+Uw3oaTZm150h6E0rVv/83VlgLDxXqYl9knmYzBpBWC2JYabM6R01cmTxK5l8Dt+v+ 8RkkNfpTe27FkXaxd8YoerOKohqKDF9wOlH0fOCXBe0shyKQmS8Rp/iUY0l5msk9z+oc jRcaQqUrLAs2OQ7X0tUyp5cdOvaHIfUgePzDcmVj73dSv+fyy0L/J0DWshnxjGs46nje AbpQ== X-Gm-Message-State: AOUpUlFSZgKoqQnsBC0XWQYLrdu0CAG3+9MglxBh9JCIiCLJ0gDA2ZoY QXeOZDUcYXmh7xefZHyRfPcoWuhmW6mXKzCaAUjoWA== X-Google-Smtp-Source: AAOMgpdp/AnBO3cbQttrFE2LTYxPXrEryDYIGRy2ss/BjIPBkUqD5dbe4Hjohnfydwz8x1EGqBJnd4btjruLsBSdR0w= X-Received: by 2002:a02:3344:: with SMTP id k4-v6mr8361606jak.45.1533422391840; Sat, 04 Aug 2018 15:39:51 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:4485:0:0:0:0:0 with HTTP; Sat, 4 Aug 2018 15:39:51 -0700 (PDT) X-Originating-IP: [86.153.210.77] In-Reply-To: <201808042224.w74MOgLi095274@pdx.rh.CN85.dnsmgr.net> References: <201808042208.w74M8OmD057603@repo.freebsd.org> <201808042224.w74MOgLi095274@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Sat, 4 Aug 2018 16:39:51 -0600 X-Google-Sender-Auth: Xd57GX5iAbLVF8YL3xhDitRRW64 Message-ID: Subject: Re: svn commit: r337334 - head/lib/libc/sys To: "Rodney W. Grimes" Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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: Sat, 04 Aug 2018 22:39:53 -0000 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. 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 > >