From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21697 invoked from network); 16 Dec 2023 18:01:28 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2023 18:01:28 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1702749688; b=rbCM4l/vrDfJn2QVaNjakh/JIJVNDMzQtNMH8i2/NQBg1/Yg6pa6yVJf1CDbuZwWtvfrBcjvD2 2uztEZA+AMm7bcNIA4eVJjl3i5AOjNtTDmy2DuQsAjZ0MKfiNwgsuzLaVIaCxcFRCCOAUK1mbE trmvB+9Tx94Ghv3xmyKfsUwFO+MzBipD42Uk4s+WKx50+p4ODX+z0T4gUEZxrXoL8gNZXivNex oZoH8H57fbmSHdsOrvrShrkE/HyNLU2zMt8KaqZzOIw7ZnjIH8E7OQxhntYJFB5vyLArf/Pd0D x2Bly0CwuTdypXmmtsjgYPuQ0gvrN68yP3JyQp8vbbx/sw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (iris.zentaur.org) smtp.remote-ip=198.58.127.206; dkim=pass header.d=zentaur.org header.s=dkim20200120 header.a=rsa-sha256; dmarc=pass header.from=zentaur.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1702749688; bh=1uLEoVjDOkhTDQZyMEPDIBovqfQGKvTED180IfrU0WE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Reply-To:Subject:From: To:MIME-Version:Date:Message-ID:DKIM-Signature:DKIM-Signature; b=BR7VrltSIwJoswXZ74PPQbSwuzk60+QJe+pmOKlHr7DX7qRIwahVkFOMQqglhHGrx7iqRBO4EB WWhp9QUOScBgZBkvr6FbvinXUiV/+YSAqDej4klrP8+6k4Yiwih6xVWz2rMpZi63S/gL1bwDKZ 5OXsoDNcLU3m6nwKyTTmWY6nGjRK+K6zh+CDHIwCvekXo/kOT3C1v8j/573dVzYw0XIEOmrRZ+ g5L/wEx8+h5TM1Cwc9evIxQN1iaGWany4pyudzVCzPDz2urjkWppj+iHu6IxAA5I8DgsSscO7K W6OcDdtuXB+Hxi324tA2QXvTWSOuZ5KFgVadlygqVjt08Q==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Reply-To:Subject:From:To:MIME-Version:Date:Message-ID:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=vVGUDDu9wlgO6ax+BtJDraDx/Q3X9UjN2MFBXxWnC90=; b=CLiWFNLUDfEBhseCWk7SArqKkH HiZFtsNzFyP5dzZCDEXO7C6ViyEwEJFFaw17bYWfVFkn5n/kg0wH3O7Kfby8dN4J/1tmRHgNL4hBG 6LXbeq1M2yrh9Vlqo7rYb7XvTJN5o+nSBQaHzl2842PQHA41M/iNzeNiFDRiYP5Q2toIUZZghdI8J vEfgSRDwBLhS10IihW39xk2WT5ErzfxHK1ngZ0/iONqV4oEae0phwbeXTceL7g9RbSMMVJSCXFCWj vTnJ3b+/e9cQ149wZb0l37K1DQWUbScrxph5SXjzSZ3MRVF7OlstVeUPsheCMmn+HPynLUbUg9UZ+ zJFFu0dg==; Received: by zero.zsh.org with local id 1rEYyd-000Hii-8G; Sat, 16 Dec 2023 18:01:27 +0000 Authentication-Results: zsh.org; iprev=pass (iris.zentaur.org) smtp.remote-ip=198.58.127.206; dkim=pass header.d=zentaur.org header.s=dkim20200120 header.a=rsa-sha256; dmarc=pass header.from=zentaur.org; arc=none Received: from iris.zentaur.org ([198.58.127.206]:36698) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rEYxH-000Gzh-0y; Sat, 16 Dec 2023 18:00:04 +0000 Received: from iris.zentaur.org (localhost [127.0.0.1]) by iris.zentaur.org (Postfix) with ESMTP id 4Ssv4d0W6Dz3wZv for ; Sat, 16 Dec 2023 18:00:01 +0000 (UTC) Authentication-Results: iris.zentaur.org (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=zentaur.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zentaur.org; h= content-transfer-encoding:content-type:reply-to:subject:from:to :content-language:user-agent:mime-version:date:message-id; s= dkim20200120; t=1702749600; x=1702753201; bh=1uLEoVjDOkhTDQZyMEP DIBovqfQGKvTED180IfrU0WE=; b=ILlOYsbBEN7/5PolL7ylxjZHgVCglHL/IEC orGG+kyHUWz57PD5JUO23YXbaBEPlYmjRQdod7afthoj0H6Qv//CcA3l33i/mD6J Ia9GOKBgPbxbvy37di78HbYgxwqyoy1E44pb5u/+fDxnCblZbP7aqU43SVMjTfdF uaKeO6QYUMwIGvU7LxJeoJI3WlRWg80iN/JjLpuedDiscIygmLDDFQQ8MYN5QGd+ vhvIWI1bN1sl4DSNz1Ydgcfqkek7GTyiZsRU1049VvoS1iUrzteKMe4A6XLAjnPF Pht5cFKy95krAPhOT2IVdzNjBzoMRNfuHQ9Kj+SxboGITDn47Ug== X-Virus-Scanned: amavis at iris.zentaur.org Received: from iris.zentaur.org ([127.0.0.1]) by iris.zentaur.org (iris.zentaur.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 8OJa2K2tnukV for ; Sat, 16 Dec 2023 18:00:00 +0000 (UTC) Received: from [192.168.72.128] (unknown [136.50.110.105]) by iris.zentaur.org (Postfix) with ESMTPSA id 4Ssv4c43PKz3wZt for ; Sat, 16 Dec 2023 18:00:00 +0000 (UTC) Message-ID: <876b57b2-94ec-4e3b-95b8-1aded0562d42@zentaur.org> Date: Sat, 16 Dec 2023 11:59:59 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "zsh-users@zsh.org" From: Clinton Bunch Subject: set temporary environment variables for builtins Reply-To: "zsh-users@zsh.org" Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Seq: 29361 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: I was playing around with date formats using print -P and tried to get the time in Paris. This didn't work: TZ=Europe/Paris print -P '%D{%Y%m%dT%H%M%S%z}' This does: export TZ=Europe/Paris print -P '%D{%Y%m%dT%H%M%S%z}' but I have to unset/restore TZ afterwards. I also tried: () { typeset -x TZ=Europe/Paris; print -P '%D{%Y%m%dT%H%M%S%z}' } It left me with TZ set. I know this can be done with the date command, but it's one of those things that went from "Let's try this" to "Surely, there's a way to do this" Is this a bug or design decision? echo $ZSH_VERSION $ZSH_PATCHLEVEL $OSTYPE 5.8 zsh-5.8-0-g77d203f linux-gnu cat /etc/system-release Rocky Linux release 9.3 (Blue Onyx)