Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easyrsa-tools.lib: cert_date_to_time_stamp_s(), macOS alternate format #1211

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dev/easyrsa-tools.lib
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ cert_date_to_timestamp_s: input error"
)"
then : # ok

# Darwin alternative
elif timestamp_s="$(
date -u -j -f '%Y-%m-%d %H:%M:%SZ' \
"$in_date" +%s 2>/dev/null
)"
then : # ok

# busybox
elif timestamp_s="$(
busybox date -D "%b %e %H:%M:%S %Y" \
Expand Down