]> code.ossystems Code Review - openembedded-core.git/commitdiff
bootmisc.h: use "date -s" to set time
authorKevin Tian <kevin.tian@intel.com>
Fri, 3 Sep 2010 08:37:20 +0000 (16:37 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 3 Sep 2010 17:17:45 +0000 (18:17 +0100)
without "-s", 201009031653 would be interpreted incorrectly by date
and then we saw below warning:
date: invalid date 165320100903

Fix [BUGID #265]

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh

index bd11f9a2fc111210ed1e1904146ca45d63d12b8d..162df2b87ef3ce995c1121a614e6fa87a4659d10 100755 (executable)
@@ -71,7 +71,7 @@ then
        read TIMESTAMP < /etc/timestamp2
         NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)`
         if [ $NEEDUPDATE -eq 1 ]; then 
-               date $TIMESTAMP
+               date -s $TIMESTAMP
                /etc/init.d/hwclock.sh stop
        fi
 fi