New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Adjust time automatically

How are you using your Bubba? Got ideas for a cool modification? Share!
Locked
juicer
Posts: 23
Joined: 23 Jan 2007, 10:16

Adjust time automatically

Post by juicer »

Bubbas internal clock seems to lag quite heavily. Atleast mine lags about 0,08 s per hour. To avoid having to set the time through the GUI every now and then, do the following while logged in as root:

First, change the timezone to your local timezone (for some reason bubba's default is UTC). Type 'tzconfig' and follow the instructions.

Secondly, install ntpdate:

> apt-get update
> apt-get install ntpdate

Lastly, add the following line to cron (using 'crontab -e'):

0 */2 * * * /usr/sbin/ntpdate ntp1.sp.se

This will call ntpdate once every two hours which is enough to avoid stepping the time which would be needed if the offset is to great. The server 'ntp1.sp.se' can be changed to any NTP-server you like (google on NTP...). You can add more than one server for fallback. See man page on ntpdate for details.
msx
Posts: 106
Joined: 13 Jan 2007, 06:03
Location: Venice
Contact:

Post by msx »

this is very useful, thanks :)
spoodie
Posts: 21
Joined: 24 Jan 2007, 13:32

Post by spoodie »

Good idea, thanks a lot!
hawkman
Posts: 16
Joined: 23 Apr 2007, 06:58

Post by hawkman »

That is nice! :D
I changed the time zone, but now the time on the web interface is showing wrong time... -2h

Where can I change that?

BR
H
Clive
Posts: 164
Joined: 07 Mar 2007, 07:15

Post by Clive »

I had a similar problem after I had done this hack. I think you need to restart apache to get it to show the time according to the correct timezone. I think I just rebooted Bubba and that solved it.
hawkman
Posts: 16
Joined: 23 Apr 2007, 06:58

Post by hawkman »

Sweet!

Yup, that solved it :D Thx
Locked