Question
How to set the timezone in Plesk and enable its Synchronization?
Answer
Using Plesk Interface
- Log into Plesk;
- Go to Tools & Settings > System Time;
- Set the correct time zone for the server;
- Enable the Synchronize system time option and specify the NTP server domain name or its IP address;
- Click OK.
Using the command line interface
-
Connect to the server through SSH;
-
Set the correct timezone for the server, for example:
# plesk sbin timemng --set-timezone --timezone=America/Sao_Paulo
The list of timezone names is available here: List of Supported Timezones
-
Set NTP server synchronization as a crontask:
# plesk sbin timemng --set-sync-time --time-server=pool.ntp.org
-
Enable the NTP synchronization:
# plesk db "replace into misc(param,val) values ('ntp_enabled','true');"
-
Set pool.ntp.org as the server to sync server time:
# plesk db "replace into misc(param,val) values ('ntp_server','pool.ntp.org');"
-
Restart Plesk-managed server for the time zone change takes effect:
# service sw-engine restart
Note: For Ubuntu 20.04, CentOS 8 and Debian 10, time synchronization is not available on Tools & Settings > System Time because these OSes use chronyd
service (enabled by default) for time synchronization.