Page 1 of 1

Adjust time automatically

Posted: 01 Mar 2007, 06:20
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.

Posted: 01 Mar 2007, 07:27
by msx
this is very useful, thanks :)

Posted: 01 Mar 2007, 18:47
by spoodie
Good idea, thanks a lot!

Posted: 21 May 2007, 07:07
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

Posted: 21 May 2007, 08:10
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.

Posted: 21 May 2007, 10:31
by hawkman
Sweet!

Yup, that solved it :D Thx