Skip to content

Commit

Permalink
easyrsa-tools.lib: cert_date_to_time_stamp_s(), macOS alternate format
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Aug 11, 2024
1 parent 2d99a88 commit 3c7b897
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 3c7b897

Please sign in to comment.