Eliminate dependency on GNU version of "date" #196
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Handle parsing the certificate expiration times from OpenSSL with Lua code for better cross-platform compatibility.
We were previously calling
date --date
to parse these times, but that--date
flag is only supported by the GNU version ofdate
. The BusyBox version ofdate
(under Alpine Linux) does not support this type of parsing, and neither does the BSD version. Given these differences across default versions of thedate
utility, it seems better to handle this ourselves in a more explicit fashion.As noted in #195 (comment), this dependency on GNU date originally cropped up in the v0.12.0 release, but it may have failed silently. v0.13.0 made these failures nosier in the logs, so this became more obvious. It shouldn't have affected any functionality, other than renewals not being as optimized, due to the certificate expiration date not being stored.