Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1340691ybl; Tue, 13 Aug 2019 10:56:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVHxHm4ZP7/kHvZNYh4m+olGMcBjjIQP3zdVNyTH2tyYmv0p3IDwPH6GZNl4JSbU/JMHiU X-Received: by 2002:a17:902:141:: with SMTP id 59mr39631834plb.324.1565718980748; Tue, 13 Aug 2019 10:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565718980; cv=none; d=google.com; s=arc-20160816; b=ZOAv76nMVL6KSLarjAfaM/B9VU9/gFVZGxbwXz4HgM8QTb6HQg/N3IIi0Bq6qOjL2z 9+K/oiCj8c5tbWrNkpy1oWo/R7rU8QbpgPz5nvaC8qqGwJ6Xb5xMEZ/ZtyL28mufkaHm xgojGvPOP5jBkHH4FCrA/pBdWeQyuAcwS63YPXlHU0tAFmvLjss9Uk0vkgrXj04BCNwm fB9NjRONdQiYUYGldLjYV5bJk+9mIsuZtBVePplY2wrjxgnWSqM3eTsOBUKwFS/xewtP nXCOMuTHkxflMJZHayzdGvSHNHeInEgo2AdsWQe1swCCeI7SlPdGSBg+YsbFMpJU08LX rccA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=dZ2RwAVolIIg4SLxqCkrUQomSh56qCy4thk9UpmHKR8=; b=aao4AUToOyflfyMZ5boAdnxEQMeRpqIzyFCKoIOtOcAoy/U/4ZPYO9renEI4IqwALb Qd07zfpAHOBiCcELHBF34QLqv3dfnm5KmwqP0V0xcn6fDxfzGdQyhVpLW4rS+VxC7K55 kdfKgn2Dh3kU+6Ss6xUN/Rmpv+w+7IzMz/5aMUIDsQyH1KJrOIkDOS6IUk8pCnl+F5u0 YtzII6FBw0QOtv7H3rlpQcemhPG53vD0hTboZf3Snsls1O0V4+GO49QQxO6NBVrq1Zrd Ec5OcmpsinKE7+iSLewonOIr/bsQ4aVLgqcpQhAfxS4j1hbLMhnLBNLofTtlSmx5+o61 SWcg== 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 j12si58092067plk.272.2019.08.13.10.56.04; Tue, 13 Aug 2019 10:56:20 -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 S1727992AbfHMRz1 (ORCPT + 99 others); Tue, 13 Aug 2019 13:55:27 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33280 "EHLO zimbra.cs.ucla.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727491AbfHMRz1 (ORCPT ); Tue, 13 Aug 2019 13:55:27 -0400 X-Greylist: delayed 381 seconds by postgrey-1.27 at vger.kernel.org; Tue, 13 Aug 2019 13:55:26 EDT Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A263716272D; Tue, 13 Aug 2019 10:49:04 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Avtv7kHLBo3l; Tue, 13 Aug 2019 10:49:03 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D6F6316272F; Tue, 13 Aug 2019 10:49:03 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id B3FBW389qoKq; Tue, 13 Aug 2019 10:49:03 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4DC3F16272D; Tue, 13 Aug 2019 10:49:03 -0700 (PDT) Subject: Re: New kernel interface for sys_tz and timewarp? To: Linus Torvalds , Arnd Bergmann Cc: 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 References: From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Tue, 13 Aug 2019 10:49:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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've been thinking of adding NetBSD's localtime_rz etc. functions to glibc. These functions let user programs specify the time zone for each conversion between time_t and local time, and simplify and/or speed up applications dealing with many requests coming from different time zones. These functions also ignore 'struct timezone'. There's no need to put any of this stuff into the kernel.