欧洲/伦敦的时区和BST问题

Dan*_*ter 1 unix timezone hwclock localtime

自从英国上周末在我的Centos 5.8 KVM客座上改为英国夏令时(BST)以来,我真的很挣钱.

这是一些命令输出..


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


    [root@host ~]# 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

最后,当我到欧洲/伦敦时,它只是回到美国东部时间:(


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

:(

这里还有一些文件内容:

 

    [root@host ~]# cat /etc/sysconfig/clock
    ZONE="Europe/London"
    UTC=true
    ARC=false

真的在这里苦苦挣扎,直到我的眼睛突然出现,但无济于事.

小智 6

smybolically链接文件不起作用 - 它们需要进行物理复制

[root@xxx]# mv /etc/localtime /etc/localtime.default
[root@xxx]# cp /usr/share/zoneinfo/Europe/London /etc/localtime
[root@xxx]# date
Fri Apr 13 11:35:57 BST 2012
Run Code Online (Sandbox Code Playgroud)

希望有所帮助:-)