7

How would I get a listing of all the time zones that Apple has on macOS. For example:

  • Pacific Daylight Time
  • Central European Standard Time
  • etc.

enter image description here

8

macOS uses the same TimeZone layout as FreeBSD.

Look in /usr/share/zoneinfo for each time zone file.

ls /usr/share/zoneinfo
Africa          Australia       Etc             MET             WET
America         CET             Europe          MST             posixrules
Antarctica      CST6CDT         Factory         MST7MDT         zone.tab
Arctic          EET             GMT             PST8PDT
Asia            EST             HST             Pacific
Atlantic        EST5EDT         Indian          SystemV

Traverse the directories to drill down to the timezone you need. Eg. Eastern time would be:

/usr/share/zoneinfo/America/NewYork

The file is a C library. To get the output of the file, you can use one of two commands - zdump or file:

  • zdump /usr/share/zoneinfo/America/New_York
  • file /usr/share/zoneinfo/America/New_York
  • How would you read the file in plain text? $ vim /usr/share/zoneinfo/America/Los_Angeles just gives me a bunch of gibberish @Allan. – David542 Aug 25 '17 at 21:54
3

Use this command line in a Terminal window:

sudo systemsetup -listtimezones
  • It's unfortunate that we need to use sudo for this. – lhf Nov 4 '18 at 13:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .