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

Re: zsh TZ



On Tue, 11 Dec 2007 23:14:13 +1300 (NZDT)
Atom Smasher <atom@xxxxxxxxxxx> wrote:
> i think i know the answer to this, but i'll ask anyway...
> 
>  	% uname -s
>  	FreeBSD
> 
>  	% print -P %D{%Z}
>  	NZDT
> 
> meanwhile, on linux....
> 
>  	% uname -s
>  	Linux
> 
>  	% print -P %D{%Z}
>  	Pacific/Auckland
> 
> is there a good way to get zsh to consistently report the TZ in either 
> long or short format? or does it depend on the system's version of 
> strftime?

Rather than strftime(), it may well be how the system stores the time zone
as a string.  I don't think the shell can do anything about it.

However, you could consider %z, which returns the hour offset, which is
more useful for calculations.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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