You are not logged in.

#1 2009-03-22 02:34:06

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

[SOLVED] OpenNTPD doesn't give the correct time!

I didn't know where else to put this, so I posted it here.

Anyway, for some reason, OpenNTPD is giving me the incorrect time. When I start/restart openntpd, it does not upgrade my computer to the correct time. I checked and my timezone and ntpd.conf is correct. Can anyone help?

$ echo $TZ
America/Los_Angeles


$ cat /etc/ntpd.conf
# $OpenBSD: ntpd.conf,v 1.7 2004/07/20 17:38:35 henning Exp $
# sample ntpd configuration file, see ntpd.conf(5)

# Addresses to listen on (ntpd does not listen by default)
#listen on *
#listen on 127.0.0.1
#listen on ::1

# sync to a single server
#server ntp.example.org

# use a random selection of 8 public stratum 2 servers
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
servers pool.ntp.org

Last edited by smartboyathome (2009-03-22 03:45:43)

Offline

#2 2009-03-22 02:56:51

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [SOLVED] OpenNTPD doesn't give the correct time!

Make sure your HARDWARECLOCK in /etc/rc.conf is set to "UTC".
If the time difference is too much ntpd will not be able to set it correctly, at least that is my experience, so to help the situation I do:
1. hwclock --set --date "03/21/2009 22:55:00"
2 hwclock -hctosys

Hope this helps.

R.

Offline

#3 2009-03-22 03:03:10

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: [SOLVED] OpenNTPD doesn't give the correct time!

I did all that, and it still doesn't work. hwclock -hctosys gives me the usage message for hwclock.

EDIT: tried rebooting, same result. OpenNTPD isn't working. sad

Last edited by smartboyathome (2009-03-22 03:07:47)

Offline

#4 2009-03-22 03:12:33

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [SOLVED] OpenNTPD doesn't give the correct time!

Check this page it may help http://linux.die.net/man/8/hwclock

R.

Last edited by ralvez (2009-03-22 03:14:54)

Offline

#5 2009-03-22 03:37:21

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: [SOLVED] OpenNTPD doesn't give the correct time!

Thanks, seems to be working now. Had to use hwclock -s instead of hwclock -hctosys.

Offline

#6 2009-03-22 03:39:22

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [SOLVED] OpenNTPD doesn't give the correct time!

Glad to hear.
Please close the thread (just mark it SOLVED) so other users with similar problems may benefit from your solution.

R

Last edited by ralvez (2009-03-22 03:40:00)

Offline

Board footer

Powered by FluxBB