* [bug] TZ=FOO5 stat -F%Z +mtime does not work unless TZ is otherwise exported
@ 2020-10-22 6:18 Stephane Chazelas
0 siblings, 0 replies; only message in thread
From: Stephane Chazelas @ 2020-10-22 6:18 UTC (permalink / raw)
To: Zsh hackers list
$ zsh -c 'zmodload zsh/stat; TZ=FOO5 stat -F%Z +mtime /'
GMT
$ export TZ=Europe/London
$ zsh -c 'zmodload zsh/stat; TZ=FOO5 stat -F%Z +mtime /'
FOO
(I suppose that's because it needs to be retrievable by getenv()
so that strftime() can access it, and VAR=value builtin doesn't
bother updating environ?).
The strftime builtin (from zsh/datetime) doesn't seem to have
the problem.
Doing:
f() stat -F%Z +mtime /
TZ=FOO5 f
is also fine.
LC_TIME=fr_FR.UTF-8 stat -F%A +mtime /
is also fine.
--
Stephane
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-22 6:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 6:18 [bug] TZ=FOO5 stat -F%Z +mtime does not work unless TZ is otherwise exported Stephane Chazelas
zsh-workers
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.vuxu.org/zsh-workers
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
zsh-workers@zsh.org
public-inbox-index zsh-workers
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.vuxu.org/vuxu.archive.zsh.workers
code repositories for the project(s) associated with this inbox:
https://git.vuxu.org/mirror/zsh/
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git