Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh TZ
- X-seq: zsh-users 12311
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: zsh TZ
- Date: Tue, 11 Dec 2007 16:37:37 +0000
- In-reply-to: <20071211101418.75341.qmail@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <20071211101418.75341.qmail@xxxxxxxxxxx>
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