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

Re: print builtin preceded by parameter assignment



On Wed, Apr 24, 2019 at 9:00 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> This is not related (and is not actually the case).  TZ does not
> remain exported.  What remains is that the settz() call has changed
> the current timezone of the zsh process to be something that differs
> from the value of the TZ environment variable.
>
> difference with LC_ALL is that it is recognized as semantically
> meaningful to the shell, so it has special code to invoke setlocale()
> whenever it changes.  TZ is not specially handled in the same way.

If we want to simultaneously fix the former bug and also begin
handling TZ the way Vincent expects, we would have to introduce
get/set functions for TZ analogous to those for LC_*, so that settz()
is invoked on TZ value change the same way setlocale() is on LC_*
changes.  Further we would have to examine uses elsewhere of settz()
and localtime() [most notably in prompts and zsh/datetime] to be sure
that those either aren't needed, or that they correctly save/restore
the timezone if forcing one that differs from $TZ (or from the orginal
starting timezone when TZ is not set).



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