[root@wode025 etc]# ls -al localtime*
lrwxrwxrwx. 1 root root 38 11月 26 03:32 localtime -> ../usr/share/zoneinfo/America/New_York
[root@wode025 etc]# date
2016年 03月 12日 星期六 00:00:57 EST
[root@wode025 etc]#
////// ln -s ../usr/share/zoneinfo/Asia/Shanghai localtime
[root@wode025 etc]# rm -rf localtime
[root@wode025 etc]# ls -s ../usr/share/zoneinfo/A
Africa/ Antarctica/ Asia/ Australia/
America/ Arctic/ Atlantic/
[root@wode025 etc]# ls -s ../usr/share/zoneinfo/A
Africa/ Antarctica/ Asia/ Australia/
America/ Arctic/ Atlantic/
[root@wode025 etc]# ls -s ../usr/share/zoneinfo/Asia/Shanghai localtime
ls: 无法访问localtime: 没有那个文件或目录
4 ../usr/share/zoneinfo/Asia/Shanghai
[root@wode025 etc]# ln -s ../usr/share/zoneinfo/Asia/Shanghai localtime
[root@wode025 etc]# ls -al localtime* lrwxrwxrwx. 1 root root 35 3月 12 13:02 localtime -> ../usr/share/zoneinfo/Asia/Shanghai
[root@wode025 etc]#
[root@wode025 sysconfig]# timedatectl
Local time: 六 2016-03-12 05:10:37 UTC
Universal time: 六 2016-03-12 05:10:37 UTC
RTC time: 六 2016-03-12 05:10:37
Time zone: Asia/Shanghai (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
[root@wode025 sysconfig]#
timedatectl set-timezone Asia/Shanghai
[root@wode025 sysconfig]# timedatectl --help
timedatectl [OPTIONS...] COMMAND ...
Query or change system time and date settings.
-h --help Show this help message
--version Show package version
--no-pager Do not pipe output into a pager
--no-ask-password Do not prompt for password
-H --host=[USER@]HOST Operate on remote host
-M --machine=CONTAINER Operate on local container
--adjust-system-clock Adjust system clock when changing local RTC mode
Commands:
status Show current time settings
set-time TIME Set system time
set-timezone ZONE Set system time zone
list-timezones Show known time zones
set-local-rtc BOOL Control whether RTC is in local time
set-ntp BOOL Control whether NTP is enabled
[root@wode025 sysconfig]#
原文地址:http://huangchao.blog.51cto.com/10446378/1750208