New vars have been introduced by https://review.tizen.org/gerrit/30166.
This patch changes the way that datetime variables are substituted in /etc/tizen-build.conf
* correct the previous code by adding UTC representation
* added substitution for @BUILD_TIME@
* added substitution for @BUILD_TS@
Change-Id: I43ec223019ba6699846effbf6a69c6b5f2b2dc19
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release
echo "$IMG_NAME @BUILD_ID@" >>$INSTALL_ROOT/etc/tizen-snapshot
+
+ build_ts=$(date -u +%s)
+ build_date=$(date -u --date @$build_ts +%Y%m%d_%H%M%S)
+ build_time=$(date -u --date @$build_ts +%H:%M:%S)
+
sed -ri \
-e 's|@BUILD_ID[@]|@BUILD_ID@|g' \
- -e "s|@BUILD_DATE[@]|$(date +%Y%m%d_%H%M%S)|g" \
+ -e "s|@BUILD_DATE[@]|$build_date|g" \
+ -e "s|@BUILD_TIME[@]|$build_time|g" \
+ -e "s|@BUILD_TS[@]|$build_ts|g" \
$INSTALL_ROOT/etc/tizen-build.conf
fi