Set Server Time Zones with Timedatectl


This article provides a guide to setting the server time and server time zone settings using timedatectl.

Get Server Time

To check the current time on your Linux server, login to the console and run the following command:

timedatectl status

The response should be similar to the example below.

timedatectl status response

Set Server Time

To set the server time on your Linux server, login to the command line and run the following command:

timedatectl set-time [YYYY-MM-DD HH:MM:SS]

Using the pattern above, enter the desired date and time, with the units in descending order from longest to shortest (Year...Seconds).

Set Server Time Zone

To set the server time zone on your Linux server, run the following command:

timedatectl set-timezone "America/Chicago"

Using the pattern above, enter the desired time zone using either UTC or Tz database, with the time zone enclosed in quotes.

  • server time, timedatectl
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

View Server PHP Environment with phpinfo.php

The phpinfo() function outputs a huge amount of information about the system you're using, such...

How to Change Root Password Using SSH

This article explains the method of changing the root password on a Linux Server using SSH....

How to Create Sudo User on CentOS

This article provides step-by-step setup guide for adding Sudo user to CentOS system. The sudo...

How to Use Sudo

This article provides a guide to using a Sudo user on CentOS server. From the command line,...

508 Resource Limit is Reached

If your website is on a cPanel hosting account, you may have noticed the following error message:...