终端和时钟的日期时间不一致

终端和时钟的日期时间不一致

我不明白为什么 GUI 时钟和终端中的日期命令之间相差 5 个小时。我的 BIOS 时钟设置为 GMT... 有什么想法吗?

franck@franck-ThinkPad-T61:~$ date
mercredi 11 avril 2012, 02:48:47 (UTC-0500)
franck@franck-ThinkPad-T61:~$ sudo dpkg-reconfigure tzdata

Current default time zone: 'Europe/Paris'
Local time is now:      Wed Apr 11 09:49:02 CEST 2012.
Universal Time is now:  Wed Apr 11 07:49:02 UTC 2012.

franck@franck-ThinkPad-T61:~$ tail /etc/timezone 
Europe/Paris
franck@franck-ThinkPad-T61:~$ date
mercredi 11 avril 2012, 02:49:21 (UTC-0500)
franck@franck-ThinkPad-T61:~$ sudo dpkg-reconfigure --frontend noninteractive tzdata

Current default time zone: 'Europe/Paris'
Local time is now:      Wed Apr 11 09:49:27 CEST 2012.
Universal Time is now:  Wed Apr 11 07:49:27 UTC 2012.

franck@franck-ThinkPad-T61:~$ date
mercredi 11 avril 2012, 02:49:30 (UTC-0500)

franck@franck-ThinkPad-T61:~$ sudo cat /etc/default/rcS
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=yes
VERBOSE=no
FSCKFIX=no

franck@franck-ThinkPad-T61:~$ sudo hwclock --show
mer. 11 avril 2012 07:49:48 CDT  -0.555705 secondes

答案1

谢谢,你说得对。我没有注意到 TZ 在我的 ~/.profile 文件中也被设置为 America/Chicago...

相关内容