Skip to main content

Changing timezone on Mac OS using the CLI

·115 words·1 min

If an end user using Mac OS requires the ability to manually control their timezone it’s possible to enable this using the commandline utility systemsetup. The utility provides a load of functionality but the commands required are systemsetup -gettimezone to show the current timezone that’s set, systemsetup -listtimezones to get a list of all possible timezones, and systemsetup -settimezone <timezone> which for the Europe/London timezone looks like this systemsetup -settimezone Europe/London.

If the user does not have sudo rights then the utility won’t run. Adding the following using visudo for the user fred allows fred to run these commands.

fred  ALL = /usr/sbin/systemsetup -gettimezone
fred  ALL = /usr/sbin/systemsetup -listtimezones
fred  ALL = /usr/sbin/systemsetup -settimezone *