Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1436613ybl; Tue, 13 Aug 2019 12:33:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaDJ9nuf/N4kpMYhVNL4/WoF+pKFtOczf1h/JFwfGyqXuK9WI+v25fcGjhGZoEk1kXl230 X-Received: by 2002:a17:902:e689:: with SMTP id cn9mr31363654plb.138.1565724809343; Tue, 13 Aug 2019 12:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565724809; cv=none; d=google.com; s=arc-20160816; b=Y6pUQ4rZaYPzoCPGxvDBVwVrMluqc3KFJ4Bix7WFdcY9JM1r/lEWzsK6wwf9L0RLF6 u9UTia/+WWzVNiLU+QfxW+9DbP3Fu3HC57ofcXM1eTSHeTeNh3D/qkNOeLfFNU3Yeouz GH6E8kN/in4Pqp7kU8sHcqhsKeWJ4POLG4U3w/Xog3TsYJWpuEuURMVNbNDEgP+NY1P7 KLNb8gWjYUGIG4CQd5NMf7NoZLWhxgJUJLOv1ydE3yDwpkPAzsS6yXDuKAH8sc11PciV tXCYCsSxUHhF474A/1tm8VZrUCZ1e86gZrOO2VNe9wKuBGgEt0sP4HGGO15APrCwbVHe dYEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=iJj+EZZAV/i3rNPaUmtol/N1W6QWdvGugsMf4eDgIKk=; b=kOEy/MAioGqjw/UF3/cLrMAuP+SuHIJqxH2yUHZH5luuL8l8KKCFJx8Ykt/IDotq7r UdYnxOQbqV50t5nZVkz/3CIqGESmWudQNXh7gxe4ep+Hv9c3kb5Iw+3bndZWtaaf+5HP XUBGartdtaHJET2XjJVupDT8bhesGyxu5GDkBpX3Pl7p0+FFm+Ftvqxh+q7xhQuiuU6C O3QduC7qn4DVUEqX5OKm1bu6rheRFQCY2OEf0DJ2wYpn2Lhl3XRi/XhU6up5r46jLg/1 EcTVSJFyKsZq7kFGsl/NgFTplqqQEd01e03zuEmgPDvn0H8cGzr2dbj16iY1l/uMXPGp dqjQ== 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 a64si58253922pla.432.2019.08.13.12.33.12; Tue, 13 Aug 2019 12:33:29 -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 S1726594AbfHMTb3 (ORCPT + 99 others); Tue, 13 Aug 2019 15:31:29 -0400 Received: from albireo.enyo.de ([5.158.152.32]:38012 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfHMTb3 (ORCPT ); Tue, 13 Aug 2019 15:31:29 -0400 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1hxcVt-0007t6-IB; Tue, 13 Aug 2019 19:31:21 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1hxcVt-0000qI-DD; Tue, 13 Aug 2019 21:31:21 +0200 From: Florian Weimer To: Paul Eggert Cc: Linus Torvalds , Arnd Bergmann , 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 Subject: Re: New kernel interface for sys_tz and timewarp? References: Date: Tue, 13 Aug 2019 21:31:21 +0200 In-Reply-To: (Paul Eggert's message of "Tue, 13 Aug 2019 10:49:03 -0700") Message-ID: <87tvakuak6.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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. Maybe it is possible to replace these things with other mechanisms which exist today. For example, the mount program could read a configuration file to determine the system default for the time_offset mount option and apply the value automatically. The real-time clock offset could be maintained by whatever mechanism hwclock uses. I think whatever we end up doing, we should maintain consistency after a system upgrade after architectures. It does not make sense to keep using the settimeofday hack on amd64 indefinitely, and switch to a different mechanism on RV32, so that the two ways of supplying the offset are never reconciled across architectures.