diff options
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh index ccc7f9f..df553bc 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh @@ -70,7 +70,11 @@ then read TIMESTAMP < /etc/timestamp if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then # format the timestamp as date expects it (2m2d2H2M4Y.2S) - date -u ${TIMESTAMP:4:8}${TIMESTAMP:0:4}.${TIMESTAMP:(-2)} + TS_YR=${TIMESTAMP%??????????} + TS_SEC=${TIMESTAMP#????????????} + TS_FIRST12=${TIMESTAMP%??} + TS_MIDDLE8=${TS_FIRST12#????} + date -u ${TS_MIDDLE8}${TS_YR}.${TS_SEC} test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop fi fi |