Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Clock problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
riceboy50
n00b
n00b


Joined: 12 Nov 2002
Posts: 48
Location: Southern CA

PostPosted: Sun Nov 17, 2002 12:17 pm    Post subject: Clock problems Reply with quote

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
View user's profile Send private message
woboz
n00b
n00b


Joined: 24 Oct 2002
Posts: 65

PostPosted: Sun Nov 17, 2002 12:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
riceboy50
n00b
n00b


Joined: 12 Nov 2002
Posts: 48
Location: Southern CA

PostPosted: Sun Nov 17, 2002 10:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
riceboy50
n00b
n00b


Joined: 12 Nov 2002
Posts: 48
Location: Southern CA

PostPosted: Sun Nov 17, 2002 10:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Mon Nov 18, 2002 3:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
riceboy50
n00b
n00b


Joined: 12 Nov 2002
Posts: 48
Location: Southern CA

PostPosted: Mon Nov 18, 2002 7:56 pm    Post subject: Reply with quote

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. :D
_________________
I am logged on therefore I am...
Back to top
View user's profile Send private message
jlg
Guru
Guru


Joined: 31 May 2002
Posts: 360
Location: Montreal, CANADA

PostPosted: Mon Nov 18, 2002 9:07 pm    Post subject: Reply with quote

just a little add-on...

you can also synchronize your hardware clock to your sytem clock with the following command: hwclock -w :wink:
Back to top
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 619
Location: Hasselt, Belgium

PostPosted: Mon Nov 18, 2002 11:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
jlg
Guru
Guru


Joined: 31 May 2002
Posts: 360
Location: Montreal, CANADA

PostPosted: Tue Nov 19, 2002 2:01 am    Post subject: Reply with quote

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 :D
Back to top
View user's profile Send private message
PRoGRaMMeRQ
n00b
n00b


Joined: 26 Nov 2002
Posts: 4
Location: indiana

PostPosted: Tue Nov 26, 2002 6:13 pm    Post subject: timezone problems Reply with quote

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
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 619
Location: Hasselt, Belgium

PostPosted: Tue Nov 26, 2002 9:50 pm    Post subject: Reply with quote

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 :D
Back to top
View user's profile Send private message
PRoGRaMMeRQ
n00b
n00b


Joined: 26 Nov 2002
Posts: 4
Location: indiana

PostPosted: Wed Nov 27, 2002 8:02 pm    Post subject: fixed Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum