Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1463177ybl; Tue, 13 Aug 2019 13:06:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOiaD1rVM+sSGJ2iE3Of/zldnMbfzEOYz51+XLDu2Pd3Wsgsaf9KW4l0IVrzp+L9fa8U92 X-Received: by 2002:a17:902:7448:: with SMTP id e8mr39304187plt.85.1565726764058; Tue, 13 Aug 2019 13:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565726764; cv=none; d=google.com; s=arc-20160816; b=HWBnWq6kSAf/+2a8StIKMhdmDWXJyMluvf6NLYSfSP8CK3LLDzzUcBzNT/R6kBTr/h Ew++/rAs2I02vvmBqZ45qUbnqQkSZMkmeXJKS7rK4qH2APPldb/lYyfz1tMwK4MZ2QBL XOQpI+Mr7mw3E5p5Z6RAYZkxyFNLwN2DsEvZQKpxcXdfRZMv8gWzQC0PfsnUF1kqIlFE 1zOqsKbsVJ9E5emvPzdlpIWWiuw3/O6nOwOHkis3sFOz+UVOn+SnHzo5Z4nH4z2CEHDC vGq+gXFHeQh7r/f8eeUgxvo+XTnndwJO88hZxR7hiZ3Z3LUspj8/pgls9xwNezkN6jvU 042A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Ama7Tg2aWhvE0NVoH4vqvv98NhGbGAzz1NVcfkHyItw=; b=ZNlLtXlQ09pE03wdQ3h50/4AlHhIaQb88c+xqnEOlvBZWQiuNSjjmFF6DGFYzzzppj Uu3rSHu3/uMonMaR9XCHCij4q8YNunrNgPaizTSRln/s+axuAtZCX3594eJFLhGhX85u dUqyGCrL4XG0fgueP1fe1Lif23ql2Mx6qZ3n50bGDXohgdMf/zfqZMzwRQFZ8sraGi59 LsiXS8G1GAatx8u/adqfwaIL+ab9x45RUEfQdsXzmPajdii37w7shQO3z0lUyR+eKso2 Yds1H61vElOPA3eyYGnp4z+uwVtS0jnJTCTctg5bd4h1LKGbbIgpML6ARWnphMK21a35 T0eA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30si7483006plc.181.2019.08.13.13.05.42; Tue, 13 Aug 2019 13:06:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726566AbfHMUEX (ORCPT + 99 others); Tue, 13 Aug 2019 16:04:23 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:33696 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725944AbfHMUEX (ORCPT ); Tue, 13 Aug 2019 16:04:23 -0400 Received: by mail-qk1-f193.google.com with SMTP id r6so80760095qkc.0 for ; Tue, 13 Aug 2019 13:04:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ama7Tg2aWhvE0NVoH4vqvv98NhGbGAzz1NVcfkHyItw=; b=BtogfYE6Ncz2eGiF/ANLEa9gwfZ3l20rrTX8/NSCjpuO837TMUkPGv05AZEUAw6dxW ZPUSDc4ZLLlYM4jm73lOM5wAHNScOnYPD6C24ySXIYH1+5dYBjp3GvyaWs6tTNJWxtmJ hB7u3qiISfF81oz0ZLCPbFYpIEhWn8x0ln4YdX7QBoDcjAWEnW7D9mYLjbM/P404i033 szsSXg22IwJNj24BBaOlxHVTkOO57AqUsRgHKhAHnW7Jf+HyQYU2z8mXK+IO6K2DHUx1 shR03fHkHMj8Elh8zp8lIDdBhtAsBGhDZL2Z8LNk1gmHEEnGfeeUjmbpWe2zQjhzW+8g OWkw== X-Gm-Message-State: APjAAAVKiZMBgdCFfNc+58BPz0PgnIo7JxsEZaEAFmxuwUeK7wTyNHy0 xmFatBwo4AbWa5AtoW6X5sAQ+BCOVj01D0Iiav8= X-Received: by 2002:a37:76c5:: with SMTP id r188mr35052600qkc.394.1565726662513; Tue, 13 Aug 2019 13:04:22 -0700 (PDT) MIME-Version: 1.0 References: <87tvakuak6.fsf@mid.deneb.enyo.de> In-Reply-To: <87tvakuak6.fsf@mid.deneb.enyo.de> From: Arnd Bergmann Date: Tue, 13 Aug 2019 22:04:05 +0200 Message-ID: Subject: Re: New kernel interface for sys_tz and timewarp? To: Florian Weimer Cc: Paul Eggert , Linus Torvalds , Linux Kernel Mailing List , Thomas Gleixner , John Stultz , Alexandre Belloni , Stephen Boyd , Florian Weimer , "Theodore Ts'o" , "H. Peter Anvin" , Palmer Dabbelt , Alistair Francis , GNU C Library , Karel Zak , Lennart Poettering , OGAWA Hirofumi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 13, 2019 at 9:31 PM Florian Weimer wrote: > * Paul Eggert: > > Linus Torvalds wrote: > >> I assume/think that glibc uses (a) environment > >> variables and (b) a filesystem-set default (per-user file with a > >> system-wide default? I don't know what people do). > > > glibc relies on the TZ environment variable, with a system-wide > > default specified in /etc/localtime or suchlike (there is no > > per-user default). glibc ignores the kernel's 'struct timezone' > > settings for of this, as 'struct timezone' is obsolete/vestigial and > > doesn't contain enough info to do proper conversions anyway. > > I think the configuration value that settimeofday changes is not > actually a time zone, but an time offset used to interpret various > things, mostly in a dual-boot environment with Windows, apparently > (Like the default time offset for extracting timetamps from FAT > volumes.) > > This data has to come from *somewhere*. The TZ variable and > /etc/localtime cover something else entirely. systemd and hwclock call localtime_r() when setting initial system time an tz information at boot time, so that information comes from /etc/localtime. /etc/adjtime is used to determine whether to set warp the time at boot and rtc update or not warp it. Arnd