Linux Command Line Operation to modify the system time zone

Source: Internet
Author: User
Tags time zones

# Save settings
$ Sudo mv/etc/localtime. old
# Set the time zone
 
$ Sudo ln-sf/usr/share/zoneinfo/Asia/Hong_Kong/etc/localtime
# Changed
 
# 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


From the column Rochelle Kernel

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.