From d341eadd0268c61228f5a31059fc06122d2891ef Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Wed, 15 May 2024 01:23:38 +0200 Subject: [PATCH] tar1090.sh: change way to get epcoch microseconds --- tar1090.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tar1090.sh b/tar1090.sh index 398647e..a5eae57 100755 --- a/tar1090.sh +++ b/tar1090.sh @@ -64,7 +64,7 @@ fi newChunk() { if [[ "$1" != "refresh" ]]; then - curChunk="chunk_$(date +%s%N | head -c-7).gz" + curChunk="chunk_$(date +%s%3N).gz" echo "$curChunk" >> chunk_list echo "$curChunk" >> chunk_list_all cp "$1" "$curChunk" @@ -154,7 +154,7 @@ while true; do echo "{ \"files\" : [ ] }" | gzip -1 > empty.gz fi - date=$(date +%s%N | head -c-7) + date=$(date +%s%3N) next_error=0 error_printed=0