* [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
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).