Wrong initial value in /etc/timestamp on build

Is it possible that the format of the timestamp that is loaded to /etc/timestamp does not match what is expected in timestamp-service ?

I’m getting this failure:

Jan 04 20:33:10 xx systemd[1]: Started Timestamping service.
Jan 04 20:33:11 xx systemd[1]: Starting Timestamping service...
Jan 04 20:33:11 xx load-timestamp.sh[535]: Update systemtime from /etc/timestamp
Jan 04 20:33:11 xx load-timestamp.sh[535]: date: invalid date '0320105050201603'
Jan 04 20:33:11 xx systemd[1]: timestamp.service: main process exited, code=exited, status=1/FAILURE

I did not run this on a “Vanilla” Toradex version but I believe the bug should be there as well since this:

http://git.openembedded.org/openembedded-core/tree/meta/classes/image.bbclass?h=jethro#n468

Inserts a timestamp with seconds to /etc/timestamp but this:

Does the following:

SYSTEMDATE=$(/bin/date -u "+%4Y%2m%2d%2H%2M")
TIMESTAMP=$(/bin/cat /etc/timestamp 2>/dev/null)
if [ $SYSTEMDATE -lt $TIMESTAMP ] 2>/dev/null ; then

Expects /etc/timestamp without seconds.

Hi Gardar

You are right. Since we moved to V2.5 the initial format of /etc/timestamp was wrong resulting in the error you see.

It happend a few time already that someone thought it a good idea to change the data format in /etc/timestamp without patching alongside the angstrom systemd implementition of the poor man’s RTC.

I will send a patch to the meta-angstrom fixing that.

Thank you for reporting this and your excellent evaluation of why the error happens.

Max