Skip to content

Commit

Permalink
fix for latest omnios-r151052
Browse files Browse the repository at this point in the history
  • Loading branch information
neil committed Nov 14, 2024
1 parent 532b425 commit 0c2d7b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,11 @@ _date2time() {
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
if python3 -c "import datetime; print(int(datetime.datetime.strptime(\"$1\", \"%Y-%m-%d %H:%M:%S\").timestamp()))" 2>/dev/null; then
return
fi
#Omnios
if python3 -c "import datetime; print(int(datetime.datetime.strptime(\"$1\", \"%Y-%m-%dT%H:%M:%SZ\").timestamp()))" 2>/dev/null; then
return
fi
_err "Cannot parse _date2time $1"
Expand Down

0 comments on commit 0c2d7b9

Please sign in to comment.