我已将服务器的时区设置为Central:
/etc/localtime -> /usr/share/zoneinfo/US/Central
重新启动后,当我运行date命令时,时间仍以UTC格式列出.
[root@dev etc]# date Sat Oct 5 16:14:28 UTC 2013
如何让它在当地时区显示?
解决方法
您可以检查此文件是否有问题:/ etc / localtime
使用例如:
zdump -v /usr/share/zoneinfo/US/Central or zdump -v /etc/localtime
就我而言,今年的信息如下:
/usr/share/zoneinfo/US/Central Sun Mar 10 07:59:59 2013 UTC = Sun Mar 10 01:59:59 2013 CST isdst=0 gmtoff=-21600 /usr/share/zoneinfo/US/Central Sun Mar 10 08:00:00 2013 UTC = Sun Mar 10 03:00:00 2013 CDT isdst=1 gmtoff=-18000 /usr/share/zoneinfo/US/Central Sun Nov 3 06:59:59 2013 UTC = Sun Nov 3 01:59:59 2013 CDT isdst=1 gmtoff=-18000 /usr/share/zoneinfo/US/Central Sun Nov 3 07:00:00 2013 UTC = Sun Nov 3 01:00:00 2013 CST isdst=0 gmtoff=-21600