Linux VPS How to modify time zone Linux VPS time zone settings

Source: Internet
Author: User
Tags vps vps server

Based on the NTP network pair,

Java code

The code is as follows:

#date-R

November 18, 2012 Sunday 19:33 23 cstlinux The tool for using network pairs under the system is ntpdate, and if Ntpdate is not installed, ntpdate must be installed: under CentOS:

Java code

The code is as follows:

#yum-y Install ntpdate NTP

Under Debian or Ubuntu:

Java code

#sudo apt-get install-y ntpdate ntpntpdate

After installation, you can use Ntpdate to update the Linux system (when we use Windows Time server pair):

Java code

The code is as follows:

#ntpdate time.windows.com

Change the time zone for a VPS

If the VPS defaults to a non-China time zone, the following command can be used to change to the China time zone:

Java code

The code is as follows:

#cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

Note: Under the OpenVZ VPS, only the time zone can be modified, but the VPS cannot be modified. Because the OpenVZ time is synchronized with the VPS server. If you find your OpenVZ VPS time is not correct, you can notify the VPS vendors to come to the right time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.