mirror of
https://github.com/anikeen-com/acme.sh.git
synced 2026-03-17 23:56:09 +00:00
fix _date2time
This commit is contained in:
4
acme.sh
4
acme.sh
@@ -1795,6 +1795,10 @@ _date2time() {
|
||||
if date -u -j -f "%Y-%m-%d %H:%M:%S" "$(echo "$1" | tr -d "Z" | tr "T" ' ')" +"%s" 2>/dev/null; then
|
||||
return
|
||||
fi
|
||||
#Omnios
|
||||
if da="$(echo "$1" | tr -d "Z" | tr "T" ' ')" perl -MTime::Piece -e 'print Time::Piece->strptime($ENV{da}, "%Y-%m-%d %H:%M:%S")->epoch, "\n";' 2>/dev/null; then
|
||||
return
|
||||
fi
|
||||
_err "Can not parse _date2time $1"
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user