Bananian

problems to set date and time

1 837
Hi

I have the problems to set the date and time of my Banana.

I did

root@Banane:~# date
Fr 15. Jul 14:44:26 CEST 2016
root@Banane:~#



root@Banane:~# date -s "07/14 14:06"
Do 14. Jul 14:06:00 CEST 2016

root@Banane:~# date
Fr 15. Jul 14:44:26 CEST 2016
root@Banane:~#

As you can see 2nd command show what I need but if I check again, date/time is wrong . Any idea?


Helge



bananko  


Do an apt-get install ntpdate .

ntpdate will run when an ethernet interface is brought up, and set the time from an ntp server (see /etc/default/ntpdate).

If ntpd is running, ntpdate will do nothing, however ntpdate will run prior to ntpd at bootup - so this should work out to set the time at bootup as long as there's an ethernet connection.




If your clock is way off, you may need to force ntp to sync by doing:

sudo /etc/init.d/ntp stop
sudo ntpd -q -g
sudo /etc/init.d/ntp start



You have to log in before you can reply Login | Sign Up

Points Rules