How Linux modifies system times and time zones

Source: Internet
Author: User
Tags current time time zones

To modify a time zone:


Find the appropriate time zone file/usr/share/zoneinfo/asia/shanghai

Replace the current/etc/localtime file with this file.

Or find the server you think is Standard time, and then



Modify the/etc/sysconfig/clock file and modify it to:

Zone= "Asia/shanghai"



Modified Date Time:


Modify Date Time with date

#date-S 08/24/2006

#date-S 13:02:00


Synchronizing the BIOS clock, forcing the system time to be written to the CMOS


Also, view Bois time with #hwclock-R

#tzselect can modify the time zone interactively

Linux Modify system time zone

1. View the current time zone

# Vi/etc/sysconfig/clock

2. Modify Settings Time zone

Method (1) # Tzselect Method (2 is limited to Redhat Linux and CentOS) # Timeconfig

3. Copy the appropriate time zone file, replace the system default time zone

# cp/usr/share/zoneinfo/$ main time zone/$ time zone/etc/localtime for Chinese server: # cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

4. Write the current time to the BIOS for permanent entry (avoid failure after reboot)

# Hwclock

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.