2012-04-02 114 views
1

自从英国CentOS 5.8 KVM客人上周末改为英国夏令时(BST)以来,我真的很苦恼。欧洲/伦敦时区和BST灾难

这里的一些命令输出..

 

    [[email protected] ~]# TZ=Europe/London date 
    Mon Apr 2 08:12:03 EDT 2012 
    [[email protected] ~]# TZ=Europe/Jersey date 
    Mon Apr 2 08:12:11 EDT 2012 
    [[email protected] ~]# TZ=Europe/Paris date 
    Mon Apr 2 14:12:16 CEST 2012 
    [[email protected] ~]# TZ=Europe/Rome date 
    Mon Apr 2 14:12:22 CEST 2012 
    [[email protected] ~]# TZ=Europe/Athens date 
    Mon Apr 2 15:12:27 EEST 2012 


    [[email protected] ~]# hwclock -rD 
    hwclock from util-linux-2.13-pre7 
    Using /dev/rtc interface to clock. 
    Last drift adjustment done at 1333367010 seconds after 1969 
    Last calibration done at 1333367010 seconds after 1969 
    Hardware clock is on UTC time 
    Assuming hardware clock is kept in UTC time. 
    Waiting for clock tick... 
    /dev/rtc does not have interrupt functions. Waiting in loop for time from /dev/rtc to change 
    ...got clock tick 
    Time read from Hardware Clock: 2012/04/02 12:22:27 
    Hw clock time : 2012/04/02 12:22:27 = 1333369347 seconds since 1969 
    Mon 02 Apr 2012 12:22:27 PM UTC -0.422061 seconds 

最后当我LN -sf欧洲/伦敦只是追溯到EDT :(

 

    [[email protected] ~]# ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime 
    [[email protected] ~]# date 
    Mon Apr 2 08:23:02 EDT 2012 

:(

这里的还有一些文件内容:

 

    [[email protected] ~]# cat /etc/sysconfig/clock 
    ZONE="Europe/London" 
    UTC=true 
    ARC=false 

真的在这里挣扎的人,并一直在我的眼睛弹出,但无济于事。

+0

安装NTP,忘掉HWclock。 – wildplasser 2012-04-02 12:34:37

+0

这个问题是无关紧要的,因为它与编程无关。 – Oded 2012-04-02 12:35:56

+0

对不起的话题。我没有意识到我选择了编程... *新手*我可以移动它吗? – 2012-04-02 12:50:09

回答

0

我runninng的CentOS 6.4在我的邮件服务器类似的问题64位。邮件进入时间标记为6小时!我为服务器设置了奥斯陆时间。时钟是正确的,但它显示了错误的时区。它应该是CEST:

/etc/localtime -> /usr/share/zoneinfo/Europe/Oslo 
$date 
Thu Sep 19 17:08:42 EDT 2013 

在同一时区的城市显示CEST。奇怪。解决这个问题的唯一方法是用哥本哈根代替。

localtime -> /usr/share/zoneinfo/Europe/Copenhagen 
$ date 
Thu Sep 19 17:16:55 CEST 2013 

因此,如果没有任何作品尝试在同一时区使用城市。