expdays: ignore timezone on busybox
busybox date (and/or musl?)'s strptime %z and %Z timezone detection seem to not work openssl seems to always output the date as utc anyways
This commit is contained in:
parent
152fb7af28
commit
732a19ffd3
|
@ -10,7 +10,7 @@ then
|
|||
echo $(( ($(date -j -f "%b %d %T %Y %z" "$dat" "+%s") - $(date '+%s')) / 86400 ))
|
||||
elif [ -h /bin/date ] # date is symlinked, assume its busybox
|
||||
then
|
||||
echo $(( ($(date -D "%b %d %T %Y %z" -d "$dat" "+%s") - $(date '+%s')) / 86400 ))
|
||||
echo $(( ($(date -D "%b %d %T %Y %n" -d "$dat" "+%s") - $(date '+%s')) / 86400 ))
|
||||
else
|
||||
echo $(( ($(date -d "$dat" '+%s') - $(date '+%s')) / 86400 ))
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue