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:
vulpine 2022-06-04 12:48:45 -04:00
parent 152fb7af28
commit 732a19ffd3
1 changed files with 1 additions and 1 deletions

View File

@ -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