Page 1 of 1
Date and Time out of whack..
Posted: Sun Jun 13, 2004 8:38 pm
by FXRules
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!
Posted: Sun Jun 13, 2004 9:09 pm
by Angel of Dawn
I have the problem that my Linuxtime is about 80minutes away from my msdash time
I dont know how to make both times exactly matching
Posted: Mon Jun 14, 2004 7:35 am
by nobspangle
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.
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
Replace the ntp.server.com lines with 3 or 4 servers from
this list.
then add ntp to start on boot and run it
Code: Select all
rc-update add ntp default
/etc/init.d/ntp start
Posted: Fri Jul 22, 2005 5:18 am
by Krazy
Hi,
Just thought I should make the following comment:
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
I had to type 'ntpd' instead of 'ntp' as the later didn't exist in /etc/init.d/
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
Posted: Fri Dec 29, 2006 11:09 pm
by Ianh
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
Posted: Mon Jan 01, 2007 8:18 am
by Ianh
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
Posted: Tue Jan 09, 2007 4:39 am
by Pyrite
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.
Code: Select all
cp /usr/share/zoneinfo/America/Chicago /etc/localtime
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.