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 23543
- From: Linus Arver <linusarver@xxxxxxxxx>
- To: luomat@xxxxxxxxx
- Subject: Re: Is there a way to get the “full” time zone currently in use?
- Date: Fri, 27 Jul 2018 16:09:03 -0700
- Cc: zsh-users@xxxxxxx
- 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 :cc; bh=K4WQqvO7HpvU+CwIbYawdZP1Licyf8Q5Au2OXN54QQ4=; b=Vu0PpIqcNXpIaAr392H5FnQj3oE7xO5d+Qwqik5YO+PRmRU2B4KGqmGcCk7jvk5VvG kj4vcF7cTAhhZA5GVndgGYN3n/tHeQjNS9qrA2ftsiqQXu803bvT0ouO5k8hl+y4pnm7 DCAnFuTkKHue3Lyl6rE5Culltlwe0FTNW4m38COcAPwpdYXD933SaNXfHosu7EZCzGKE omq76m85yaplp6xjye+BSR3XYPRLahpDeD3N1uSzDpg0wVvEJCYqccgGhA8VY9js7lDo byAGxUKqR23Pk49dfeLb1WrJ7Je22dhD1fnMM6aMq7k6ETvQinfcajjXMrDv+SRdQrmW VDLQ==
- In-reply-to: <CADjGqHvLPFsBRUpCFSKk=rLLyG6mBwpv4HKhJeg7N02iiv4-Yg@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>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHvLPFsBRUpCFSKk=rLLyG6mBwpv4HKhJeg7N02iiv4-Yg@mail.gmail.com>
How about
readlink /etc/localtime
?
On Fri, Jul 27, 2018 at 9:13 AM TJ Luoma <luomat@xxxxxxxxx> wrote:
> Hello Zsh Friends,
>
> I am trying to use zsh to find the current time-zone that the computer
> uses.
>
> I know that this:
>
> `strftime "%Z" "$EPOCHSECONDS"`
>
> will show me the current timezone (EDT, in my case) but I'm looking for
> "America/New_York"
>
> The only way that I can find to get that information on the Mac is
>
> `sudo systemsetup -gettimezone`
>
> but it seems absurd to need to use `sudo` to get that information.
>
> I searched the web and found that the variable "TZ" is supposed to hold
> this command, but TZ is empty in my testing on my Macs, so that's no help
> either.
>
> I've got to imagine that there's _some_ way to do this, but I'm stuck
> trying to figure it out.
>
> Anyone have a solution?
>
> Thanks for your time
>
> Tj
>
>
> --
> TJ Luoma
> TJ @ MacStories
> Personal Website: luo.ma (aka RhymesWithDiploma.com)
> Twitter: @tjluoma
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author