diff --git a/atom b/atom index c9d32e9..7496284 100755 --- a/atom +++ b/atom @@ -555,16 +555,16 @@ echo "Created ${count:-0} tasks for $filecount files ${togo:+($togo left) }(${co concurrency=$(( maxload / 2 )) (( concurrency )) || concurrency=1 active=0 -concurrencychange=$(date +%s) +printf -v concurrencychange %(%s)T starttime=$concurrencychange taskcount=$count remaining=$taskcount failed=0 echo 'BEGIN TRANSACTION;' >&3 -committime=$(date +%s) +printf -v committime '%(%s)' while (( (remaining || ${#workers[@]}) && ! quit )) do - timestamp=$(date +%s) + printf -v timestamp '%(%s)T' if (( $timestamp - committime >= 60 )) then echo $'COMMIT;\nBEGIN TRANSACTION;' >&3 @@ -673,7 +673,7 @@ done echo 'COMMIT;' >&3 unset count -endtime=$(date +%s) +printf -v endtime '%(%s)T' (( elapsedseconds = endtime - starttime - pausedtime )) (( days = diff --git a/lib/files/getFiles b/lib/files/getFiles index 8e9daf5..96dc154 100644 --- a/lib/files/getFiles +++ b/lib/files/getFiles @@ -1,6 +1,6 @@ #!/bin/bash getFiles() { - scantime=$(date +%s) + printf -v scantime '%(%s)T' for prune_expression in "${skippeddirectories[@]}" do prunes+=( -path "$sourcepath$prune_expression" -prune -o ) diff --git a/toys/createindex b/toys/createindex index 3959755..f150bef 100755 --- a/toys/createindex +++ b/toys/createindex @@ -287,7 +287,7 @@ cat <<-EOBrag # # $0 $args # - # Last database update: $(date -d @$lastupdate +'%x %X') + # Last database update: $(printf '%(%x %X)T $lastupdate) EOBrag