diff --git a/.gitignore b/.gitignore index 74f243b..2f564cb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ dist-staging easyrsa3/safessl-easyrsa.cnf testdeps/* shellcheck +.DS_Store diff --git a/ChangeLog b/ChangeLog index 39b97b4..281fd09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ Easy-RSA 3 ChangeLog * Warnings are no longer silenced by --batch (#523) * Improve packaging options (#510) * Update regex for POSIX compliance (#556) + * Correct date format for Darwin/BSD (#559) 3.0.8 (2020-09-09) * Provide --version option (#372) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 304e54e..0fe0dc9 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -1635,7 +1635,9 @@ Non-decimal value for EASYRSA_FIX_OFFSET: '$EASYRSA_FIX_OFFSET'" allow_renew_date="$(( now_sec + EASYRSA_CERT_RENEW * 86400 ))" if [ "$EASYRSA_FIX_OFFSET" ]; then - start_fix_sec="$(date -j "${this_year}01010000.00" +%s)" + start_fix_sec="$( + date -j -f '%Y%m%d%H%M%S' "${this_year}0101000000" +%s + )" end_fix_sec="$(( start_fix_sec + fix_days * 86400 ))" # Convert to date-stamps for SSL input start_fixdate="$(date -j -r "$start_fix_sec" +%Y%m%d%H%M%SZ)"