View previous topic :: View next topic |
Author |
Message |
riceboy50 n00b
Joined: 12 Nov 2002 Posts: 48 Location: Southern CA
|
Posted: Sun Nov 17, 2002 12:17 pm Post subject: Clock problems |
|
|
How do I tell gentoo that I am UTC-8? Right now it believes I am just UTC and when I synchronize with the network server via rdate -s <hostname> it synchs me properly except to the wrong timezone. My symlink in /etc/localtime seems to be correct. I must be missing something. _________________ I am logged on therefore I am... |
|
Back to top |
|
|
woboz n00b
Joined: 24 Oct 2002 Posts: 65
|
Posted: Sun Nov 17, 2002 12:20 pm Post subject: |
|
|
in the /etc/rc.conf file
CLOCK="UTC"
change to
CLOCK="local"
if your bios clock is set to local time and not utc time |
|
Back to top |
|
|
riceboy50 n00b
Joined: 12 Nov 2002 Posts: 48 Location: Southern CA
|
Posted: Sun Nov 17, 2002 10:10 pm Post subject: |
|
|
It was already set to local. Maybe there is a setting where I can tell it my offset from UTC because that is the better option anyway. You wouldn't happen to know where that is would you? _________________ I am logged on therefore I am... |
|
Back to top |
|
|
riceboy50 n00b
Joined: 12 Nov 2002 Posts: 48 Location: Southern CA
|
Posted: Sun Nov 17, 2002 10:32 pm Post subject: |
|
|
It was already set to local. Maybe there is a setting where I can tell it my offset from UTC because that is the better option anyway. You wouldn't happen to know where that is would you?
The reason I know it is a problem with my offset from UTC is because when I sync with the network server, the time is correct, it is just not offset to -8 as it should be. Either the server is returning a time based on which timezone it thinks I am in or my computer is interpreting the response based on what timezone it thinks it is in. In either case, the issue of my offset from UTC is to blame here. _________________ I am logged on therefore I am... |
|
Back to top |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Mon Nov 18, 2002 3:46 pm Post subject: |
|
|
Code: | rm -f /etc/adjtime
ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime
ntpdate -b ntp.time.gov # Whatever time server is closest, I use time.asia.apple.com for UTC+8, must emerge ntp
reboot |
After rebooting, check time. If still having problems, configure gentoo to use ntpdate to set the time every reboot. [Hint: edit /etc/conf.d/ntpd, use /etc/init.d/ntpd] |
|
Back to top |
|
|
riceboy50 n00b
Joined: 12 Nov 2002 Posts: 48 Location: Southern CA
|
Posted: Mon Nov 18, 2002 7:56 pm Post subject: |
|
|
zhenlin's solution seems to have worked like a charm, my clock now reads PST next to the correct date and time!
This is the server I am sync'ing with for any other CA people:
# United States, CA
montpelier.ilan.caltech.edu (131.215.254.2)
CNAMES: montpelier.caltech.edu, ntp-caltech.usno.navy.mil
Location: California Institute of Technology, Pasadena, CA
Thanks guys. _________________ I am logged on therefore I am... |
|
Back to top |
|
|
jlg Guru
Joined: 31 May 2002 Posts: 360 Location: Montreal, CANADA
|
Posted: Mon Nov 18, 2002 9:07 pm Post subject: |
|
|
just a little add-on...
you can also synchronize your hardware clock to your sytem clock with the following command: hwclock -w |
|
Back to top |
|
|
Matje l33t
Joined: 29 Oct 2002 Posts: 619 Location: Hasselt, Belgium
|
Posted: Mon Nov 18, 2002 11:56 pm Post subject: |
|
|
I'm badgering with the clock too. I got it too synchronize with a server. HWclock is set to local. date & hwclock --show both show the correct time, however, the gnome-applet clock doesn't? It's two hours behind. I'm in Belgium, so that is GMT+1. I created the link to the Brussels-timezone. Evolution is also having troubles with this problem. |
|
Back to top |
|
|
jlg Guru
Joined: 31 May 2002 Posts: 360 Location: Montreal, CANADA
|
Posted: Tue Nov 19, 2002 2:01 am Post subject: |
|
|
2 hours late.. thats weird.. what version of gnome? 2.1.2?
did you reboot after configuring ntp?
are you running ntpd?
How did you procede to configure your time?
The way I do it:
ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime
emerge ntpd
rc-update add ntpd default
create a file /etc/ntp.conf which contains the server to synchronize. mine contains the following line:
server bitsy.mit.edu
I then edit /etc/init.d/ntpd and add the following line before the closing "}" of the start function
hwclock -w #synchronize hardware clock
reboot and its all good |
|
Back to top |
|
|
PRoGRaMMeRQ n00b
Joined: 26 Nov 2002 Posts: 4 Location: indiana
|
Posted: Tue Nov 26, 2002 6:13 pm Post subject: timezone problems |
|
|
I have the exact same problem that the first message in this topic describes. my hardware clock is set to local.
I followed the instructions on the x86/install manual exactly, and I checked them twice.
/etc/local -> /usr/share/zoneinfo/America/Indianapolis
/etc/rc.conf line 32:
CLOCK="local"
if I use ntp or rdate to set the clock from trusted servers (ones I use on my other machines) it sets the clock to UTC, and not UTC-0500, like where I am. I tried the solution where I rm -f /etc/adjtime and set the clock with ntp. no effect. I even rebooted. the only way I can see to get the clock to local time is to set the hardware clock to the system clock. when I set system time from hardware clock, when I type date, it says UTC time, and displays local time. nothing seems to work. I've compared files on my other systems, and everything seems to be identical. I've used linux for about 3 years, but since redhat and slackware have guis for setting up the timezone, I've never dealt with it manually. any other suggestions would be much appreciated because I do like to keep my clock synchronized.
Thank you! _________________ Duct tape is like the force. It has a light side, a dark side, and it holds the universe together. |
|
Back to top |
|
|
Matje l33t
Joined: 29 Oct 2002 Posts: 619 Location: Hasselt, Belgium
|
Posted: Tue Nov 26, 2002 9:50 pm Post subject: |
|
|
Just wanted to mention that my problem is solved, without doing anything After a reboot the clock was synchronized and now it stays so thx to the ntp daemon. Don't ask me how I did it |
|
Back to top |
|
|
PRoGRaMMeRQ n00b
Joined: 26 Nov 2002 Posts: 4 Location: indiana
|
Posted: Wed Nov 27, 2002 8:02 pm Post subject: fixed |
|
|
for some reason my zoneinfo files were corrupt. I fixed the problem by copying a working zoneinfo file in use on one of my slackware boxes. works great now.
thanks anyway. _________________ Duct tape is like the force. It has a light side, a dark side, and it holds the universe together. |
|
Back to top |
|
|
|