Simple Method for Setting Linux VPS System Synchronization Time and Time Zone

80% of VPS users may choose their preferred system directly after purchasing VPS, and then configure the environment according to one click package, WEB panel, or other project requirements directly according to the system. There is rarely a habit of changing the system time and time zone. If there is a compatibility issue between the panel and the time zone, such as WDCP panels, if the time conflicts with the current time, the panel will not log in and will remain in the login interface. And some programs may have errors when submitting articles or project submission times compared to actual operations, so we need to adjust the VPS system time to synchronize with the actual current required time.
Firstly, modify the Beijing time zone
Here, changing Beijing time is used as the default time zone. If there are other requirements, they can be modified accordingly.
Rm rf/etc/localtime # Delete the default time zone setting first
Ln - s/var/share/zone info/Asia/Shanghai/etc/local time # Replace Shanghai/Beijing as default
Secondly, manually modify the current system time
date -s '14:00:00 2019-11-26'
Here is an example of modifying to the current time.
Thirdly, set the synchronization time
ntpdate us.pool.ntp.org
Set the synchronization server time, and after installation, we will test the current time using date.
Most VPS have NTP installed. If it is not installed, we need to first install apt get install ntupdate (debian system).
In summary, by following the above 3 steps, we can quickly achieve synchronization between the Linux VPS system time and the current required time zone and time, ensuring the normal operation of the project.

  • linux, 修改时区, 修改时间, 时间, vps时间
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to change the root user password of Linux operating system

Changing the root user password of the Linux operating system is a critical operation, please...

Can websites not use SSL certificates? There may be issues with websites not installing SSL certificates

Website security certificate, also known as website SSL certificate. Nowadays, we see many...