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 23545
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: TJ Luoma <luomat@xxxxxxxxx>
- Subject: Re: Is there a way to get the “full” time zone currently in use?
- Date: Sun, 29 Jul 2018 10:32:52 -0500
- Cc: linusarver@xxxxxxxxx, Zsh-Users List <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=QFmJ2bxKfLoxDRwjoISwT36JxItsY5vd8yVsc67FUao=; b=EaU7flhCoJh9If3UC6otwTGKi2WtSnvjF5tnqI1TpHrMqggaGdrnKXdH6On+pM3DS9 nj1DXJSEusjmMLg39epXyJBUExKLGcbpO2LDvv6APWSARwO6yTHLwYiEGUtVX7vJh5Zb Vfw0YwAomoPO+Rd38RXDXKcToVwLMVaudSaEsW6WCoAxrdIQb5nC3QIYlyhR01l4Hqps AXkCp2PtIir3MIBmwY+jrihMHTL7x1uqPMiejX+vsMC+2ZksOtwesadyHfASwC7hkFne OyQ3oApa+4jISc3Pp1+oBaHIVV96+eFPGrboJJpdJq2KHm97WdPf2Sw03PHGHjO6uqIJ D3mQ==
- In-reply-to: <CADjGqHu7VFA88e7BzNdxvy3jufV8eEb4ziwRkxC2FP6ey7w+dA@mail.gmail.com>
- 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>
- Mail-followup-to: TJ Luoma <luomat@xxxxxxxxx>, linusarver@xxxxxxxxx, Zsh-Users List <zsh-users@xxxxxxx>
- 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>
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