Browse Source

# remove millisecond part

master
fred 4 weeks ago
parent
commit
af51349bba
  1. 4
      zen/ipns_TAG_refresh.sh

4
zen/ipns_TAG_refresh.sh

@ -69,7 +69,7 @@ do
[[ -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)
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"
[ $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=$(date -u +%s%N | cut -b1-13)
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"
[ $STAMPDIFF -lt 39600000 ] && continue # 11h = 39600000 ms / 12h = 43200000 ms

Loading…
Cancel
Save