From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 1a940da7 for ; Thu, 11 Apr 2019 10:41:38 +0000 (UTC) Received: (qmail 24087 invoked by alias); 11 Apr 2019 10:41:20 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23928 Received: (qmail 15195 invoked by uid 1010); 11 Apr 2019 10:41:20 -0000 X-Qmail-Scanner-Diagnostics: from cventin.lip.ens-lyon.fr by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.1/25412. spamassassin: 3.4.2. Clear:RC:0(140.77.13.17):SA:0(-1.9/5.0):. Processed in 2.243128 secs); 11 Apr 2019 10:41:20 -0000 X-Envelope-From: vincent@vinc17.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at vinc17.net does not designate permitted sender hosts) Date: Thu, 11 Apr 2019 12:40:40 +0200 From: Vincent Lefevre To: zsh-users@zsh.org Subject: Re: print builtin preceded by parameter assignment Message-ID: <20190411104040.GA29775@cventin.lip.ens-lyon.fr> Mail-Followup-To: zsh-users@zsh.org References: <20190410125557.GA19114@cventin.lip.ens-lyon.fr> <1554902053.6252.6.camel@samsung.com> <20190410141113.GD15169@cventin.lip.ens-lyon.fr> <1554907186.6252.12.camel@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.11.4+145 (46b4c0aa) vl-114617 (2019-04-08) On 2019-04-10 10:25:18 -0700, Bart Schaefer wrote: > For what it's worth, Bash seems to (mostly) agree with the zsh > interpretation. If I set HISTTIMEFORMAT to something containing %Z > and then run "TZ=UTC history" I get timestamps in the local timezone, > not in UTC. If I first export TZ=UTC and then run history, I get > timestamps in UTC. Your test seems incorrect. $ HISTTIMEFORMAT=%Z $ history 1 CESTps [...] $ TZ=UTC history 1 UTCps [...] This is with: GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. Ditto with: GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2016 Free Software Foundation, Inc. Adding the --posix option doesn't change the behavior related to the output timezone. > *However*, if I run "HISTTIMEFORMAT='%r ' history" the change takes > place for the builtin and I get the different format. Ditto here. > So it seems to matter whether the variable itself is "known" to > Bash, or something. At least I get a consistent behavior. This suggests something wrong with your test of TZ. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)