When I load up Gentoox the date and time are off...its like a day behind...but if I go into XBMC or a dash the time is correct? Anyone else have this problem? Can I have it sync to a server on the net when it loads? How?
Thanks!
Date and Time out of whack..
-
- Adept
- Posts: 51
- Joined: Sat Jan 10, 2004 4:25 pm
- Contact:
-
- Gentoox Guru!
- Posts: 1681
- Joined: Sun Sep 28, 2003 11:59 am
- Location: Manchester, UK
this is a stange problem the way linux works is that when it loads up, it reads the time from the system clock and then keeps time itself. I would expect to see it loose or gain time over the course of a day (as much as 40 or 50 seconds) but it should always be the same as the system clock to start with.
There are two ways to sync to a server. Both require ntp so first
If your box is just used in linux occasionally and only needs syncing when you turn it on. Edit /etc/conf.d/ntp-client uncomment the line NTPCLIENT_OPTS="-b someserver" and change someserver to the IP address or hostname of a local ntp server from this list. Then to run the ntp client at startup. If your time seems to have drifted whilst you are using the box you can run the client manually
If your box is running linux as a server and needs to be kept in sync you will have to use the full ntp server.
Edit ntp.conf to look like this.
Replace the ntp.server.com lines with 3 or 4 servers from this list.
then add ntp to start on boot and run it
There are two ways to sync to a server. Both require ntp so first
Code: Select all
emerge ntp
If your box is just used in linux occasionally and only needs syncing when you turn it on. Edit /etc/conf.d/ntp-client uncomment the line NTPCLIENT_OPTS="-b someserver" and change someserver to the IP address or hostname of a local ntp server from this list. Then
Code: Select all
rc-update add ntp-client default
Code: Select all
/etc/init.d/ntp-client restart
Edit ntp.conf to look like this.
Code: Select all
logfile /var/log/ntpd/ntpd.log
driftfile /var/state/ntp.drift
server ntp.server1.com
server ntp.server2.com
server ntp.server3.com
server ntp.server4.com
server 127.127.1.0
fudge 127.127.1.0 stratum 4
then add ntp to start on boot and run it
Code: Select all
rc-update add ntp default
/etc/init.d/ntp start
If you keep an open mind, will your brain fall out?
Hi,
Just thought I should make the following comment:
This relates to the latest ntp version I could find via emerge today [22 Jul 05], viz:
net-misc/ntp -- Latest version available: 4.2.0.20040617-r2
BTW, for those not living in Britain, remember to set your timezone as appropriate.
Just thought I should make the following comment:
I had to type 'ntpd' instead of 'ntp' as the later didn't exist in /etc/init.d/If your box is running linux as a server...
<snipped>
then add ntp to start on boot and run it
Code: Select all
rc-update add ntp default /etc/init.d/ntp start
This relates to the latest ntp version I could find via emerge today [22 Jul 05], viz:
net-misc/ntp -- Latest version available: 4.2.0.20040617-r2
BTW, for those not living in Britain, remember to set your timezone as appropriate.
NTP and time
I am new to this so sorry if you think I should know the answer.
The Hardware clock on my xbox is not set to the correct time/date. Although I do have a mod chip which is supposed to allow you to use the xbox bios (by pushing the eject button to power up) it doesn't want to work. I don't want to get the soldering iron out again so I'm going to put up with the wrong hardware time/date. As far as I can see (google etc) there is no way of setting the hardware time/date.
I can across this thread and I attmepted to "emerge ntp" . I got the following error message "dev-java/java-config-1.3 pacjage conflicts with another package"
Can any one help ? I have tried to unmerge the java package but I got the error message "couldn't find 'java-config-1.3' to unmerge"
Thank you
Ian
The Hardware clock on my xbox is not set to the correct time/date. Although I do have a mod chip which is supposed to allow you to use the xbox bios (by pushing the eject button to power up) it doesn't want to work. I don't want to get the soldering iron out again so I'm going to put up with the wrong hardware time/date. As far as I can see (google etc) there is no way of setting the hardware time/date.
I can across this thread and I attmepted to "emerge ntp" . I got the following error message "dev-java/java-config-1.3 pacjage conflicts with another package"
Can any one help ? I have tried to unmerge the java package but I got the error message "couldn't find 'java-config-1.3' to unmerge"
Thank you
Ian
In case anyone else comes across the hardware time issue
http://www.linuxsa.org.au/tips/time.html
basically set the software clock using date then run
sbin/hwclock --systohc'
to sync the two clocks
IanH
http://www.linuxsa.org.au/tips/time.html
basically set the software clock using date then run
sbin/hwclock --systohc'
to sync the two clocks
IanH
I had this problem with the full native install. I am not using NTP.
First, set the date with the `date` command like this:
eg.
for January 08 2007 at 22:33 PM
Second, set your correct timezone. Set your time zone information by copying the correct file from /usr/share/zoneinfo over the /etc/localtime file. Eg, for me, I use CST for America/Chicago.
Third, edit the /etc/conf.d/clock file like mine.
This saves the current system date/time to the hardware clock. When you reboot, it should be what you set with the date command. Hope this helps somebody.
First, set the date with the `date` command like this:
Code: Select all
date MMDDhhmmYYYY
Code: Select all
date 010822332007
Second, set your correct timezone. Set your time zone information by copying the correct file from /usr/share/zoneinfo over the /etc/localtime file. Eg, for me, I use CST for America/Chicago.
Code: Select all
cp /usr/share/zoneinfo/America/Chicago /etc/localtime
Code: Select all
CLOCK="UTC"
CLOCK_SYSTOHC="yes"