You are not logged in.
Hello all. Recently it seems like the timezone setting in my rc.conf is ignored.
rc.conf:
HARDWARECLOCK="UTC"
TIMEZONE="America/New_York"
--
$ date
Sat May 22 23:22:35 UTC 2010
$ hwclock -r
Sat 22 May 2010 11:22:59 PM UTC -0.984645 seconds
I am syncing successfully with ntp, but I can't figure out how to automatically adjust the system clock for the timezone.
The bios time is utc. I've deleted /var/lib/hwclock/adjtime and linked /etc/localtime to /usr/share/zoneinfo/America/New_York many times.
Thanks for any help you can offer!
Last edited by evilgnome (2010-05-27 06:52:00)
Offline
The date is the same, it's only a different format.
11:22 PM == 23:22
day/month/year v. month/day/year
Did you try setting hwclock to localtime instead of UTC?
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Warsaw"
[karol@black ddelta]$ date
Sun May 23 02:07:44 CEST 2010
[karol@black ddelta]$ date -u
Sun May 23 00:07:51 UTC 2010
Last edited by karol (2010-05-23 00:02:47)
Offline
As karol said, your time is set correctly. It's just not printed in the correct format for you.
Would you have clock readings using Eastern Daylight Savings Time rather than UTC?
$ date
Sat May 22 20:06:18 EDT 2010
$ hwclock -r
Sat 22 May 2010 08:06:22 PM EDT -0.922194 seconds
Do you have the locale set properly in /etc/rc.conf?
LOCALE="en_US.utf8"
The output of the command 'locale' on my machine:
$ locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
Edit: Typos only become noticed after you click on submit.
Last edited by thisoldman (2010-05-23 00:26:20)
Offline
The date is the same, it's only a different format.
11:22 PM == 23:22
day/month/year v. month/day/year
As karol said, your time is set correctly. It's just not printed in the correct format for you.
Yes, I know those two dates are the same -- but they were both four hours off. The hardware clock is set correctly, but the system clock is not. Neither of those should have been UTC.
Did you try setting hwclock to localtime instead of UTC?
Yes, I tried that, but something went wrong and I switched back. I think the hardware clock kept resetting to UTC time. I could try again if I can't solve this problem, but I'd rather have the timezone settings working.
Would you have clock readings using Eastern Daylight Savings Time rather than UTC?
What should I do to check -- set timezone to EST in rc.conf and reboot? Or is it EST5EDT? or US/Eastern?
Do you have the locale set properly in /etc/rc.conf?
All my locale info is the same as yours except I have "en_US.UTF8" instead of "en_US.utf8"
Thanks for helping me out with this!
Offline
Perhaps resetting to TIMEZONE="US/Eastern" will do the trick. My settings appear to have no difference from yours. See http://bbs.archlinux.org/viewtopic.php?pid=296964
The basic problem, which I don't know how to solve permanently, is how to reset the 'TZ' environmental variable. I tried this:
$ export TZ=:/usr/share/zoneinfo/US/Central
$ date
Sun May 23 04:15:47 CDT 2010
$ export TZ=:/usr/share/zoneinfo/America/New_York
$ date
Sun May 23 05:16:00 EDT 2010
Some distros symlink /etc/localtime to the proper file in /usr/share/zoneinfo/ . Arch appears to copy the file instead. I tried:
$ ls -li /etc/localtime
1428004 -rw-r--r-- 1 root root 3519 May 23 05:27 /etc/localtime
$ ls -li /usr/share/zoneinfo/America/New_York
123897 -rw-r--r-- 3 root root 3519 May 15 11:08 /usr/share/zoneinfo/America/New_York
$ cmp -b /usr/share/zoneinfo/America/New_York /etc/localtime
I found no differing bytes using 'cmp'.
Edit: /usr/share/zoneinfo/US/Eastern is the same file as /usr/share/zoneinfo/America/New_York -- same inode.
Last edited by thisoldman (2010-05-23 10:36:11)
Offline
Perhaps resetting to TIMEZONE="US/Eastern" will do the trick.
Nah, hasn't made a difference.
The basic problem, which I don't know how to solve permanently, is how to reset the 'TZ' environmental variable. I tried this:
$ export TZ=:/usr/share/zoneinfo/US/Central $ date Sun May 23 04:15:47 CDT 2010 $ export TZ=:/usr/share/zoneinfo/America/New_York $ date Sun May 23 05:16:00 EDT 2010
Hmmm, that doesn't seem to adjust the time either for me:
$ date
Wed May 26 21:57:18 UTC 2010
$ export TZ=:/usr/share/zoneinfo/US/Central
$ date
Wed May 26 21:57:26 2010
$ export TZ=:/usr/share/zoneinfo/America/New_York
$ date
Wed May 26 21:57:39 2010
$ cmp -b /usr/share/zoneinfo/America/New_York /etc/localtime
I found no differing bytes using 'cmp'.
Well here's something interesting:
$ cmp -b /usr/share/zoneinfo/US/Eastern /etc/localtime
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/America/New_York
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/US/Central
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/US/Pacific
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/America/Los_Angeles
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/EST
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/UTC
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/Europe/Amsterdam
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/Europe/Athens
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/Europe/Copenhagen
$ cmp -b /usr/share/zoneinfo/US/Eastern /usr/share/zoneinfo/Europe/Zurich
$ cat /usr/share/zoneinfo/US/Eastern
$
It looks like all my timezones are dummies, so I figured I'd reinstall the corresponding package:
$ pacman -Qo /usr/share/zoneinfo/US/Eastern
error: No package owns /usr/share/zoneinfo/US/Eastern
So am I supposed to regenerate those timezones, and if so, how?
Thanks again for investigating with me!
Offline
$ pacman -Qo /usr/share/zoneinfo/US/Eastern
/usr/share/zoneinfo/US/Eastern is owned by tzdata 2010j-1
I hope installing the tzdata package and perhaps rebooting solves this for you. Keep us posted on the results.
Offline
Yes, I overwrote my timezone files with a reinstall of tzdata and copied the new America/New_York file over /etc/localtime and all is well. I haven't rebooted yet, but I don't expect this to be a problem anymore. Thank you for your help!
Offline