MacOS – How to get a timezone set automatically according to location service

macostimezone

My environment is 10.13.4 (High Sierra).

I turn on Set date and time automatically and want to acquire the timezone.

I am aware of systemsetup -gettimezone which only can run with sudo, however, it returns the timezone set by TZ=foo/hoge in my rcscript.

I want to acquire the computer's current, automatically-set time zone via the command line.

Best Answer

Launch System Preferences. Select "Date & Time", then open the "Time Zone" panel. (If necessary, authenticate as Administrator to unlock.) Click in the checkbox to turn on "Set time zone automatically using current location"