Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is there a way to get the “full” time zone currently in use?
- X-seq: zsh-users 23549
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Re: Is there a way to get the “full” time zone currently in use?
- Date: Tue, 31 Jul 2018 09:54:18 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=idjiWw2bu+oMTDT0mvCNKVcL3zPHU+GFjlMVZZ9EAr4=; b=Ry1VQWqwVOK7rChHyT5/g66mmCxYr2FsBpHlMpyFXLkqY1goTx76xu2uHH1hlgtsYK VV7FZbQYSReuJJlsz5orwaOuw7TJ7cOfWvvY+RbHb503RCLXWyVN//PmAnXVRjSe+ysv pm2XPlD1OFbaGe0OlURfVaLg/MFC1hcOYaDi5JKb64eqCtdvgOWifxqmMwUdnVpv0j6Y sG1TXWK/IXjgy9Ed40mYD3VqnWeqDayr7ZlgUHTdfxoeikx94yeIxUoUAiLwkBATnMOZ 3EpPiNdgF4TKeFu9R/mma5W3HiCaF2UqK2GeUWi+RdC0c40SNq2RJg9IJHDXO4gc2QPW sHkg==
- In-reply-to: <20180729153250.GA63277@CptOrmolo.darkstar>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHvLPFsBRUpCFSKk=rLLyG6mBwpv4HKhJeg7N02iiv4-Yg@mail.gmail.com> <CAMo6p=HNc+2yWegoKG+ACJ3T9D07HhQ0V=tX8Jsi5NsaXyKpYg@mail.gmail.com> <CADjGqHu7VFA88e7BzNdxvy3jufV8eEb4ziwRkxC2FP6ey7w+dA@mail.gmail.com> <20180729153250.GA63277@CptOrmolo.darkstar>
Wow. That’s excellent. Another Zsh feature that I clearly need to learn
more about, because I use ’sed’ for that sort of thing _all the time_.
Thanks!
TjL
--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>
On Sun, Jul 29, 2018 at 11:32 AM Matthew Martin <phy1729@xxxxxxxxx> wrote:
> On Sun, Jul 29, 2018 at 08:56:21AM -0400, TJ Luoma wrote:
> > That works, and I haven’t found anything else that does. This:
> >
> > readlink /etc/localtime | sed ’s#.*/zoneinfo/##g'
>
> There's no need for external commands here.
>
> a=(/etc/localtime(:A)) # Resolve the symlink
> print ${a##*/zoneinfo/} # Remove text preceding and including /zoneinfo/
>
> - Matthew Martin
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author