forked from axiom-team/astrXbian
# remove millisecond part
This commit is contained in:
parent
80de5613a6
commit
af51349bba
|
@ -69,7 +69,7 @@ do
|
||||||
[[ -f ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/.timestamp ]] && TIMESTAMP=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/.timestamp) # LAST REFRESH
|
[[ -f ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/.timestamp ]] && TIMESTAMP=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/.timestamp) # LAST REFRESH
|
||||||
timestamp=$(date -u +%s%N | cut -b1-13)
|
timestamp=$(date -u +%s%N | cut -b1-13)
|
||||||
STAMPDIFF=$((timestamp - TIMESTAMP))
|
STAMPDIFF=$((timestamp - TIMESTAMP))
|
||||||
echo "Last Update : $(date -d @$TIMESTAMP)"
|
echo "Last Update : $(date -d @$TIMESTAMP | cut -b1-10)" # remove millisecond part
|
||||||
echo "${mediakey} LAST UPDATED $STAMPDIFF milliseconds AGO"
|
echo "${mediakey} LAST UPDATED $STAMPDIFF milliseconds AGO"
|
||||||
[ $STAMPDIFF -lt 21600000 ] && continue # 6h = 21600000 ms , 10h = 36000000 ms
|
[ $STAMPDIFF -lt 21600000 ] && continue # 6h = 21600000 ms , 10h = 36000000 ms
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ for ipnslink in $(ls ~/.zen/PIN/*/IPNSLINK 2>/dev/null | shuf ); do
|
||||||
[[ ! $TIMESTAMP ]] && TIMESTAMP=$(cat /tmp/${mediakey}/*/.timestamp 2>/dev/null | tail -n 1 ) # INITIAL TIMESTAMP
|
[[ ! $TIMESTAMP ]] && TIMESTAMP=$(cat /tmp/${mediakey}/*/.timestamp 2>/dev/null | tail -n 1 ) # INITIAL TIMESTAMP
|
||||||
timestamp=$(date -u +%s%N | cut -b1-13)
|
timestamp=$(date -u +%s%N | cut -b1-13)
|
||||||
STAMPDIFF=$((timestamp - TIMESTAMP))
|
STAMPDIFF=$((timestamp - TIMESTAMP))
|
||||||
echo "Last Update : $(date -d @$TIMESTAMP)"
|
echo "Last Update : $(date -d @$TIMESTAMP | cut -b1-10)" # remove millisecond part
|
||||||
echo "PIN WAS LAST UPDATED $STAMPDIFF milliseconds AGO"
|
echo "PIN WAS LAST UPDATED $STAMPDIFF milliseconds AGO"
|
||||||
[ $STAMPDIFF -lt 39600000 ] && continue # 11h = 39600000 ms / 12h = 43200000 ms
|
[ $STAMPDIFF -lt 39600000 ] && continue # 11h = 39600000 ms / 12h = 43200000 ms
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue