From 8228b2d56ef2415c8b96d1463fb38816279d4c74 Mon Sep 17 00:00:00 2001 From: Tasslehoff Kjappfot Date: Fri, 21 Feb 2014 11:37:27 +0100 Subject: [PATCH] Fix timestamp so it matches the one written by image.bbclass. --- .../systemd/timestamp-service/load-timestamp.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/recipes-core/systemd/timestamp-service/load-timestamp.sh b/recipes-core/systemd/timestamp-service/load-timestamp.sh index 82c69f6..f1c9723 100755 --- a/recipes-core/systemd/timestamp-service/load-timestamp.sh +++ b/recipes-core/systemd/timestamp-service/load-timestamp.sh @@ -5,10 +5,10 @@ # use the timestamp instead. SYSTEMDATE=$(/bin/date -u "+%4Y%2m%2d%2H%2M") -YEAR=$(cat /etc/timestamp | cut -b 9-12) -MONTH=$(cat /etc/timestamp | cut -b 1-2) -DAY=$(cat /etc/timestamp | cut -b 3-4) -TIME=$(cat /etc/timestamp | cut -b 5-8) +YEAR=$(cat /etc/timestamp | cut -b 1-4) +MONTH=$(cat /etc/timestamp | cut -b 5-6) +DAY=$(cat /etc/timestamp | cut -b 7-8) +TIME=$(cat /etc/timestamp | cut -b 9-12) TIMESTAMP="$YEAR$MONTH$DAY$TIME" @@ -18,5 +18,6 @@ if [ $SYSTEMDATE -lt $TIMESTAMP ]; then fi if [ "$1" = "--save" ] ; then - /bin/date -u +%2m%2d%2H%2M%4Y > /etc/timestamp + /bin/date -u +%4Y%2m%2d%2H%2M > /etc/timestamp fi +