From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7032 invoked by alias); 29 Jul 2018 12:57:04 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23544 Received: (qmail 23360 invoked by uid 1010); 29 Jul 2018 12:57:04 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f47.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.47):SA:0(-1.9/5.0):. Processed in 1.595918 secs); 29 Jul 2018 12:57:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: luomat@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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=K/2bJSfjt4cTOU+L2C5BW5JiuHCcbSND1kbONn29HW0=; b=RDiuGzT0Tc4omvqPouYMmBDNxpaCn7w0AH8G92eSepEK7iRS6RG4a/xYPu8W2Kms9P +fX5Ptwny0DDeM1KbGf82E5icaLtKYesw4xd7m41LfibyPr+EIM7/U0ZGAJDWUNXVihJ OZNH2n3MbhDpDL297TDl9nBUnwTKwJBnUyOP1W4XPQH3b03UDJphJXcB+weJuCV5xiIL 4lFOq1iMBOPe3LkKjJ1D1g72xt5tayJCdMHR04+ieYp1Nmk/E5c7yxsxDnsO64paLMdA VznPzGY1etbuviqse1FfSZ5SWNLl1zFilvRV0w8xfWFKGhbwiFFnHYJZ1E0iCLX5eWF3 u0fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K/2bJSfjt4cTOU+L2C5BW5JiuHCcbSND1kbONn29HW0=; b=kQsEMwfokjMLIIJhITyDNLeMHmwHhrGfGaEfAj/9Z+DzGTcRSE3c7lzKkTrbn5UC0N if9E/QV2g1AajkRoIVOZAVcXx9V2XzR848fC91OhoH+qRR/M4lZG/Hm63V6LTtVIxUdw 8IGUsxok//i8yDR0aeDQK1loPc3np0TKtaWRTavIWvgoxGBm7oMjU9dSVNCvJwQru2nJ x0s964zhEyicGwVTf1RJOw5wnrY42PRJcGz47jlUKQMRRt0GvW5l5BP5u2LQ4InOOKLz 34GDZU2+SVD2IzLmHiPaEaRYB3ixvw2e7G2sY6yAU0wOGqfZVsQF1RijXZ0x1QS3dOOz qCnA== X-Gm-Message-State: AOUpUlFJwk+1W+wWBXUzLAean1mduvl68JzoPTTHS6IdtZOpw3vi7EM6 lj2zK52Dep9x4kE58TYAEyG/iJphYK0oXqWNsEE= X-Google-Smtp-Source: AAOMgpdlUNTeFJndOogc1HsgIoHDnfzUo719sIn5OT6kCjXZe338ur/ycIaxcMmWZ6gpTm7ByGUuXVUI+B0YAVIDJ4I= X-Received: by 2002:a1c:7ed8:: with SMTP id z207-v6mr11575667wmc.139.1532869018787; Sun, 29 Jul 2018 05:56:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: TJ Luoma Date: Sun, 29 Jul 2018 08:56:21 -0400 Message-ID: Subject: =?UTF-8?Q?Re=3A_Is_there_a_way_to_get_the_=E2=80=9Cfull=E2=80=9D_time_zone_c?= =?UTF-8?Q?urrently_in_use=3F?= To: linusarver@gmail.com Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="0000000000005a2587057222e163" --0000000000005a2587057222e163 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That works, and I haven=E2=80=99t found anything else that does. This: readlink /etc/localtime | sed =E2=80=99s#.*/zoneinfo/##g' gives me the exact same information as sudo systemsetup -gettimezone | sed =E2=80=99s#^Time Zone: ##g=E2=80=99 which is what I wanted. Thanks! TjL -- TJ Luoma TJ @ MacStories Personal Website: luo.ma (aka RhymesWithDiploma.com ) Twitter: @tjluoma On Fri, Jul 27, 2018 at 7:09 PM Linus Arver wrote: > How about > > readlink /etc/localtime > > ? > > On Fri, Jul 27, 2018 at 9:13 AM TJ Luoma 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 hel= p >> 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 >> > --0000000000005a2587057222e163--