From: Paul Hänsch Date: Wed, 13 Mar 2024 23:41:17 +0000 (+0100) Subject: bugfix: time calculation X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=rigidfind bugfix: time calculation --- diff --git a/index.cgi b/index.cgi index 94c3970..945d133 100755 --- a/index.cgi +++ b/index.cgi @@ -236,14 +236,14 @@ elif [ "$REQUEST_METHOD" = "POST" ]; then )" results="${results% }" - t="$(( ${_DATE}${_date_n} - $(date +%s%N) ))" + t="$(( $(date +%s%N) - ${_DATE}${_date_n} ))" cat <<-EOF Status: 200 OK X-elastic-product: Elasticsearch Content-Type: application/vnd.elasticsearch+json;compatible-with=8 - { "took":$((t / 1000)), + { "took":$((t / 1000000)), "timed_out":false, "hits": { "total":{"value": $(DB2 "$results" count @) ,"relation":"eq"},