Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Is there a way to get the “full” time zone currently in use?
- X-seq: zsh-users 23541
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Is there a way to get the “full” time zone currently in use?
- Date: Fri, 27 Jul 2018 12:12:14 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=8J/S8sbnqudoCCxB/9r/Q301cnES+soH7MZVM9ZxlqY=; b=HBX/Hs/vzM5xxsZVYHpTrPufTHox6yc1uGhhFbKmIpcAJV8s2uhXrk0dsiwGWKzh06 ahSFUwyEeBvFxcy6KUv5oI80IxpTHiU9g7K9U6lTX0rdbu6ISxE4GHvbmO3jG/9p4+us qXUJvyUenuheZIERS82Ht25Pfymrx7Qv7yCXuPWkB5cm7z0dULPu8o8uGwBg0xNRRuj4 NVomnbA0lJaSJLEfZCfoTdcgEHTpDqGEnaFYLy6bkNl2NY7ja5JgQEqlACZa8e7sHm/f xk1H3RfP2vlvRhtze8dmAQavx9DMvNIfidpjvykGg+uNGbqThS/wrnUkAwSXXZ71yNQL BV+g==
- 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
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