Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Possible inconsistency with use of TZ to change zone output '%Z"

Unfortunately my searches never found that mail thread. Sorry about that.
I'm sure the print builtin has nothing to do with the results I am getting.

1) DT=${(%):-%D{$Fmt}}
2) zstat -F $Fmt -A A +mtime $F
3) strftime -s DT $Fmt $ET

In each case the results were placed in a parameter then printed if and as needed.

The thread left me somewhat confused, quite a bit to digest. Probably because I'm
not a "developer" and know enough C to be a danger to myself and those around
me. I understand that for a particular system the libraries may differ from
other systems, and once compiled, will "fix" the way it acts(environment strings
or not). But if parameter expansion is using zsh's strftime shouldn't it act the
same way as calling strftime directly. My results indicate that they don't.
It seems logical to me that they would. Admittedly I don't know the internals, so
I'll accept the results and export TZ as needed.

Z-shell is still my all time favorite shell. Never cared for the de facto linux default.
Sorry for the personal opinion.

Appreciated you taking the time to respond,


On Thu, Jan 6, 2022 at 6:58 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
There's a lengthy discussion of this in the zsh-users thread with
subject "print builtin preceded by parameter assignment" from April

The upshot is that some system libraries only use the environment
strings when interpreting the time zone.

Messages sorted by: Reverse Date, Date, Thread, Author