mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
fix for solaris time format
This commit is contained in:
parent
922553032b
commit
0f607413d0
10
acme.sh
10
acme.sh
@ -1615,9 +1615,8 @@ _time2str() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Solaris
|
#Solaris
|
||||||
if _exists adb; then
|
if printf "%(%Y-%m-%dT%H:%M:%SZ)T\n" $1 2>/dev/null; then
|
||||||
_t_s_a=$(echo "0t${1}=Y" | adb)
|
return
|
||||||
echo "$_t_s_a"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Busybox
|
#Busybox
|
||||||
@ -1788,6 +1787,11 @@ _date2time() {
|
|||||||
if date -u -d "$(echo "$1" | tr -d "Z" | tr "T" ' ')" +"%s" 2>/dev/null; then
|
if date -u -d "$(echo "$1" | tr -d "Z" | tr "T" ' ')" +"%s" 2>/dev/null; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#Solaris
|
||||||
|
if gdate -u -d "$(echo "$1" | tr -d "Z" | tr "T" ' ')" +"%s" 2>/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
#Mac/BSD
|
#Mac/BSD
|
||||||
if date -u -j -f "%Y-%m-%d %H:%M:%S" "$(echo "$1" | tr -d "Z" | tr "T" ' ')" +"%s" 2>/dev/null; then
|
if date -u -j -f "%Y-%m-%d %H:%M:%S" "$(echo "$1" | tr -d "Z" | tr "T" ' ')" +"%s" 2>/dev/null; then
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user