Changing the SMC server time zone and date
By default the SMC server time zone is GMT+1 (Central European Time).
Changing the time zone
- Log in to the SMC server via the console of your hypervisor or in SSH.
- Enter the command
smc-date-time --timezone "timezone”
to change the time zone. Replacetimezone
with the correct time zone.- To see the available time zones, enter the command
ls -l /usr/share/zoneinfo/
, - To find the city in the zone of your choice (Asia for example), enter the command
ls /usr/share/zoneinfo/Asia
.
- To see the available time zones, enter the command
- Restart the server with the command
reboot
. This step is required in order for the new time zone to be applied to all services. - Enter the command
smc-date-time
to check that the change has been properly applied.
Changing the date manually
- Enter the command
smc-date-time --date-time "YYYY-MM-DD hh:mm:ss"
to change the date. - Enter the command
smc-date-time
to check that the change has been properly applied.
Changing the date via NTP
To enable NTP on the SMC server:
- Enter the command
smc-date-time --ntp-servers ntp1.org,ntp2.com,IPaddress
separating each NTP server with a comma if there are several. NTP servers may also be identified by their IP addresses or DNS names. - Enter the command
date
to check the modification has been properly applied.
To disable NTP, you need to go back to manual date mode.
Displaying a comprehensive summary of the SMC server's date/time
- Enter the command
smc-date-time
to display all of the server's date/time parameters:
smc-date-time TIMEZONE=Asia/Dubai NTPSERVERS=none LOCALDATE=2016-05-18 09:05:19