Setting timezones

9,516

Looks like /usr/share/zoneinfo/America/New_York has incorrect content.

Try issuing zdump America/New_York or TZ=America/New_York date

Share:
9,516

Related videos on Youtube

McEnroe
Author by

McEnroe

Updated on September 18, 2022

Comments

  • McEnroe
    McEnroe almost 2 years

    I want to set my timezone to America/New_York. date says that the current time is CEST. I'm using systemd, no desktop environment.

    Right now I have

    /etc/localtime links to /usr/share/zoneinfo/America/New_York
    /etc/timezone set to "America/New_York"
    /etc/rc.conf set to "America/New_York" (arch linux should be ignored by systemd)
    $TZ is unset
    

    Hardware clock is set to utc time and works fine.

    TZ=utc date
    

    gives the right output.

    Unfortunately I'm still on CEST. Am I missing something?

  • McEnroe
    McEnroe about 12 years
    [root@jupiter etc]# zdump /usr/share/zoneinfo/America/New_York /usr/share/zoneinfo/America/New_York Tue Jul 3 19:20:40 2012 CEST Seems you're right ...
  • McEnroe
    McEnroe about 12 years
    And I fixed it by re-installing tzdata. No idea how this could have happened. A corrupt file was the last thing I expected. Thanks!
  • poige
    poige about 12 years
    @McEnroe, That's why I would advice against symlinking to /usr/share/zoneinfo/. Actually, previously there was also such a reason due to problems with separate /usr partition layout making the link dangling until it got mounted finally during boot. Another one, as your issue shows is overwriting /etc/localtime would muck up original file as well. So, it's better to cp not ln