Linux command line operation to modify the system time zone
Source: Internet
Author: User
# Save $ sudomv/etc/localtime. old # set the time zone $ sudoln-sf/usr/share/zoneinfo/Asia/Hong_Kong/etc/localtime # This is done # Update some files, this file is composed of system-config... # save settings
$ Sudo mv/etc/localtime. old
# Set the time zone
# Update some files. This file is read by the system-config-date command.
$ Sudo vim/etc/sysconfig/clock
# You can also use the following command to modify it. a GUI is displayed.
$ Sudo system-config-date
# Update time from time server
$ Sudo rdate-s nist1-ny.ustiming.org
# Synchronizing system time to hardware
$ Sudo hwclock -- systohc
In addition, I would like to share some knowledge about the time zone:
GMT Greenwich Mean Time GMT Standard Time
UT Universal Time world Time
UTC Coordinated Universal Time UTC + 0: 00 Coordinated Universal Time
HKT Hong Kong Time UTC + Hong Kong Standard Time
In Linux, the current time zone can be viewed using the date command.
In Linux, the Chinese time zone is represented by CST.
However, this representation is unreasonable. Because CST represents the following four time zones at the same time.
CST Central Standard Time (USA) UTC-6: 00
CST Central Standard Time (Australia) UTC + 9: 30
CST China Standard Time UTC + 8: 00
CST Cuba Standard Time UTC-4: 00
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