One, time zone
1. View the current time zone
Date-r
2. Modify the settings time zone
Method (1)
Tzselect
Method (2) limited to Redhat Linux and CentOS
Timeconfig
Method (3) applies to Debian
Dpkg-reconfigure Tzdata
3. Copy the appropriate time zone file, replace the system time zone file, or create a linked file
cp/usr/share/zoneinfo/$ main time zone/$ times time zone/etc/localtime
Can be used in China:
Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime
====================================================
My virtual machine on the pro-test
1. Date-r
2. Tzselect
Select 1 (Asia)----5 China---1Beijing
3. sudo cp/usr/share/zoneinfo/asia/shanghai/etc/localtime
====================================================
Second, time
1. Check the time and date
Date
2. Set time and date
command to set the system date to June 10, 1996
Date-s 06/22/96
command to set the system time to 1:52 P.M. 0 seconds
Date-s 13:52:00
3. Write the current time and date to the BIOS to avoid failure after reboot
Hwclock-w
Note:
For more detailed command instructions please join the man
Note:
Aa.
Without parameters you can see this month's monthly calendar directly
Reference:
Http://www.bitscn.com/linux/system_manage/200604/6898.html
http://www.hypexr.org/linux_date_time_help.php
Http://www.debianadmin.com/ntp-server-and-client-configuration-in-debian.html
Http://www.time.ac.cn/stime.asp
This article turns from http://www.cnblogs.com/h2appy/archive/2008/11/27/1342029.html
"Go" view/modify Linux time zone and time