time fix2

This commit is contained in:
Maciej Krok 2016-12-26 22:50:24 +01:00
parent 0ce4b543c4
commit a85a9694f2

View File

@ -9,8 +9,8 @@ WXFILE="/tmp/aprs.wx.xml"
TIMECASH=$(( 60 * 10 )) # 5 minut TIMECASH=$(( 60 * 10 )) # 5 minut
NOW=$(( $(date -u +%s) - $TIMECASH )) NOW=$(date -u +%s)
LASTTIME=$(( $(xmlstarlet sel -t -v "/xml/entries/entry/time" $WXFILE ) + 1 )) LASTTIME=$(( $(xmlstarlet sel -t -v "/xml/entries/entry/time" $WXFILE ) + $TIMECASH ))
if (( $NOW > $LASTTIME )) if (( $NOW > $LASTTIME ))
then then