Update system time on boot (wireless)

On bootup, my BBB comes up with an always wrong date/time. Since it has not battery, I understand this.

So, I want the BBB to query NTP to get the correct date on bootup. I am also running wireless, so it has to happen after the wireless connects. I am confused on how to accomplish this with the current Debian and systemd. Previous instructions say to just install ntp. But this doesn’t appear to do anything. I do see timedated and time-sync, but I am unsure if those are what I want or how to configure them.

If I run ntpdate manually, it works fine. I also see that cron.daily is also set to run ntpdate. In the syslog, I also see two calls to set system time from two different IP addresses. Those times are off by years. If I run ntpdate against those IP addresses, it runs fine.

Other documentation talks about ntpdate.service or timedatectl (coming in Jessie?), but that doesn’t exist here.

I also tried setting /etc/adjtime to LOCAL instead of UTC. I do actually want local time. I also linked /etc/localtime to /use/share/…/America/Los_Angeles.

Mostly I am just trying to figure out how to get started here. I am unfortunately rather unfamiliar with systemd. Thanks.

So use init. init scripts work fine along side systemd. Albeit boot times may be slightly slower. The package name you want is ntpdate, e.g.

apt-get install ntpdate

You may also want to configure locales via . . .

dpkg-reconfigure locales

http://www.embeddedhobbyist.com/debian-tips/beaglebone-black/beaglebone-black-init-scripts-default-gatewayand-ntpdate/