Skip to content

Commit 3717762

Browse files
committed
use compilation timestamp from os-release as a fallback date and time
1 parent a441ce2 commit 3717762

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

overlay/etc/init.d/F01datetime

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ start() {
1010
exit 1
1111
fi
1212

13-
if date -u -s "@$(stat -c%X "$OS_RELEASE_FILE")" >/dev/null; then
13+
if date -u -s "@$(awk -F'=' '/^TIME_STAMP/{print $2}' "$OS_RELEASE_FILE")" >/dev/null; then
1414
echo_info "$(date) (fail-safe)"
1515
else
1616
echo_error "Failed to set time"

0 commit comments

Comments
 (0)