Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Timezones and print -P %D
- X-seq: zsh-users 26158
- From: Clinton Bunch <cdbunch@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Timezones and print -P %D
- Date: Thu, 12 Nov 2020 13:38:59 -0600
- Archived-at: <https://zsh.org/users/26158>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-11/0e1487c3-589f-3b91-87e8-48fb964e633a%40zentaur.org>
- 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
- Authentication-results: iris.zentaur.org (amavisd-new); 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-language:content-type :content-type:mime-version:user-agent:date:date:message-id :subject:subject:from:from:to; s=dkim20200120; t=1605209940; x= 1605213541; bh=fqtnlnd0Xf1qRZ4K/UDb3f6Rc2ZOMh5vsswpcQCOxwQ=; b=C sl0OsCDjNFYqZIDbHE5b1lpA+pt4Dq2TM7x45O51P+69JCOu/ydiCYV893H7p1HM vLdKFVNnuqHP2TpLbbMQDJYNQfg3gyXfzBUrfwgO8BAJTGCyY6HGo/VvBqdigWzo beM2AG7DfqrYmnQWQctP6YqzjrKg5L+yJfla1aT98HZ0PxsMGDVrc3aiPm2C7EVA aEg3jPU4lRu5gLxXlsH/VOxqhis9vewIclBj+ScYBqAxKw7XU1b8BiHYP4gcTYND HrRGqTEbR2Bn9TFv17wU5fQvelUUS0kLiM79ayfz4NjnyGDR1RRL+2CS0IrP2ioS O1qPqk9BGkPgw5FIOhtUA==
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- Sender: zsh-users-request@xxxxxxx
Can someone explain what's going on here? I was under the impression
that variable assignments on the command-line were exported to the
environment and only effective for the life of the command.
cdblinux[~]% unset TZ
cdblinux[~]% print -P '%D{%Y-%m-%dT%H:%M%z}'
2020-11-12T13:32-0600
cdblinux[~]% TZ=UTC print -P '%D{%Y-%m-%dT%H:%M%z}'
2020-11-12T13:33-0600
cdblinux[~]% export TZ
cdblinux[~]% TZ=UTC print -P '%D{%Y-%m-%dT%H:%M%z}'
2020-11-12T19:33+0000
cdblinux[~]% print -P '%D{%Y-%m-%dT%H:%M%z}'
2020-11-12T19:33+0000
cdblinux[~]% unset TZ
cdblinux[~]% print -P '%D{%Y-%m-%dT%H:%M%z}'
2020-11-12T13:33-0600
cdblinux[~]% cat /etc/system-release
CentOS Linux release 8.2.2004 (Core)
cdblinux[~]% uname -a
Linux cdblinux.cfhp.com 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26
03:54:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
cdblinux[~]% echo $ZSH_VERSION
5.5.1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author