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

Re: print builtin preceded by parameter assignment



On Thu, Apr 11, 2019 at 3:42 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> On 2019-04-10 10:25:18 -0700, Bart Schaefer wrote:
> > For what it's worth, Bash seems to (mostly) agree with the zsh
> > interpretation.  If I set HISTTIMEFORMAT to something containing %Z
> > and then run "TZ=UTC history" I get timestamps in the local timezone
>
> Your test seems incorrect.

My bash version is 3.2, so this changed in 4.something.

The actual takeaway here is that TZ has to be pushed into the actual
environ strings, not just set temporarily as a local to the shell, in
order for the system time libraries to apply it to strftime et al.
Most other variables used by shell builtins would not have this
property.



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