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

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 » 01 Mar 2007, 07:27

this is very useful, thanks :)

spoodie
Posts: 21
Joined: 24 Jan 2007, 13:32

Post by spoodie » 01 Mar 2007, 18:47

Good idea, thanks a lot!

hawkman
Posts: 16
Joined: 23 Apr 2007, 06:58

Post by hawkman » 21 May 2007, 07:07

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: 149
Joined: 07 Mar 2007, 07:15

Post by Clive » 21 May 2007, 08:10

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 » 21 May 2007, 10:31

Sweet!

Yup, that solved it :D Thx

Locked