Wrong linux command result: who -b

Hi, I am using a script which simply runs @reboot in crontab an should move a file to a new file with a date in the filename.

I am not a Linux expert, but I wonder why the shell command:

$(date +"%Y%m%d%H%M") result is:


January 1st 2000

Then I tried with “who -b”, same result:
system boot Jan 1 00:00

Date command is ok:

root@beaglebone:~/Desktop# date
Tue Aug 20 14:01:24 UTC 2013

Is there a bug in the kernel here?

Thank you!

Best regards,

Forgot to say I am using Angstrom:

root@beaglebone:~/Desktop# uname -a
Linux beaglebone 3.8.13 #1 SMP Tue Jun 18 02:11:09 EDT 2013 armv7l GNU/Linux

Did you use a real time module ?

The clock of the BBB is set by the web so this take some tine. At reboot the time is always set to January 1st 2000.

You could use the Dr. Derek Molloy blog Automatically Setting the Beaglebone Black Time Using NTP
“Fixing the Hardware Clock” part to allow your BBB to be set at reboot.

I think add the folowing line in ntpdate.service file will solve your problem

ExecStart=/sbin/hwclock --systohc