How to Change the Timezone on a VPS?
A Virtual Private Server (VPS) is an excellent choice for hosting your website or application. One of the important aspects of setting up a VPS is properly configuring the timezone. In this article, we will tell you how to easily change the timezone on your VPS.
To begin, you will need access to the command line of your VPS. You can connect to the server via SSH using a program like Putty.
After successfully connecting to the server, execute the following command to view the current timezone:
timedatectl
This command will show you the current timezone of your VPS. To change the timezone, execute the following command:
timedatectl set-timezone 'Europe/Moscow'
Replace ‘Europe/Moscow’ with the timezone you need. You can view a list of available timezones by executing the following command:
timedatectl list-timezones
After changing the timezone, it is recommended to reboot the server for the changes to take effect. To do this, execute the command:
reboot
Now you should have a correctly configured timezone on your VPS. Configuring the timezone is important for the correct operation of task scheduling, logging, and other time-dependent operations on the server. Follow these instructions and you can easily change the timezone on your VPS. Good luck!