Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
0f607413
Commit
0f607413
authored
Apr 03, 2022
by
neilpang
Browse files
fix for solaris time format
parent
92255303
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
0f607413
...
...
@@ -1615,9 +1615,8 @@ _time2str() {
fi
#Solaris
if
_exists adb
;
then
_t_s_a
=
$(
echo
"0t
${
1
}
=Y"
| adb
)
echo
"
$_t_s_a
"
if printf "%(%Y-%m-%dT%H:%M:%SZ)T\n" $1 2>/dev/null; then
return
fi
#Busybox
...
...
@@ -1788,6 +1787,11 @@ _date2time() {
if date -u -d "$(echo "$1" | tr -d "Z" | tr "T" ' ')" +"%s" 2>/dev/null; then
return
fi
#Solaris
if gdate -u -d "$(echo "$1" | tr -d "Z" | tr "T" ' ')" +"%s" 2>/dev/null; then
return
fi
#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
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment