Commit 603c05f7 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Use UTC when calling date command

parent ded30adf
......@@ -35,6 +35,7 @@ BLKID=blkid
BLOCKDEV=blockdev
REGLOOKUP=reglookup
CHNTPW=chntpw
DATE="date -u" # Time in UTC
CLEANUP=( )
ERRORS=( )
......
......@@ -90,7 +90,7 @@ if [ -z "$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS" ]; then
echo "Execute all snf-image tasks...."
$RUN_PARTS -v --exit-on-error "@tasksdir@" 2>&1|
while IFS= read -r line; do
echo $(date +%Y:%m:%d-%H:%M:%S.%N) "$line"
echo $($DATE +%Y:%m:%d-%H:%M:%S.%N) "$line"
done
fi
......
......@@ -24,6 +24,7 @@ QEMU_IMG="qemu-img"
INSTALL_MBR="install-mbr"
TIMEOUT="timeout"
CURL="curl"
DATE="date -u" # Time in UTC
# Temporary use stderr as monitoring file descriptor.
# `create' will overwrite this
......
......@@ -166,7 +166,7 @@ add_cleanup rm "$snapshot"
"$QEMU_IMG" create -f qcow2 -b "$HELPER_IMG" "$snapshot"
echo -n "$(date +%Y:%m:%d-%H:%M:%S.%N) " >&2
echo -n "$($DATE +%Y:%m:%d-%H:%M:%S.%N) " >&2
log_info "Starting customization VM..."
set +e
$TIMEOUT -k "$HELPER_HARD_TIMEOUT" "$HELPER_SOFT_TIMEOUT" \
......@@ -196,7 +196,7 @@ if [ $rc -ne 0 ]; then
fi
exit 1
else
echo -n "$(date +%Y:%m:%d-%H:%M:%S.%N)" >&2
echo -n "$($DATE +%Y:%m:%d-%H:%M:%S.%N)" >&2
log_info "Customization VM finished."
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment