Setting timezones from command line on MacOS
We wrote some tests that failed recently in a timezone other than our own (☹️). In order to reproduce this failure we had to set the timezone of our local machine to the failure timezone.
sudo systemsetup -settimezone America/New_York
Easy enough. You can get all the timezones available to you with:
sudo systemsetup -listtimezones
And also check your current timezone
sudo systemsetup -gettimezone
systemsetup has 47 different time/system oriented commands. But it needs a
sudo even to run
> systemsetup -help You need administrator access to run this tool... exiting!
Don't fret you can get this important secret information via the man page