one , View and modify Linux Time zone for

1. View current time zone

command : “date -R”

2. Modify settings Linux Server time zone

method A

command : “tzselect”

method B be confined only to RedHat Linux and CentOS

command : “timeconfig”

method C Applicable to Debian

command : “dpkg-reconfigure tzdata”

3. Copy the corresponding time zone file , Replace system time zone file ; Or create a linked file

cp /usr/share/zoneinfo/ main Hour area / Primary time zone / Primary time zone / Secondary time zone /etc/localtime

for example : Use Asia in setting China time zone / Shanghai (+8)

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

two , View and modify Linux Time of

1. View time and date

command : “date”

2. Set time and date

for example : Set the system date to 2009 year 11 month 3 Order of the day

command : “date -s 11/03/2009”

Set the system time to afternoon 5 spot 55 branch 55 Second command

command : “date -s 17:55:55”

3. Write current time and date to BIOS, Avoid failure after restart

command : “hwclock -w”

notes :

date

You can directly view the current date and time without adding parameters

cal

You can directly view the current month's calendar without adding parameters

Technology