Skip to content

Commit a11ece1

Browse files
authored
Update entrypoint.sh to use POSIX-compliant date command for next run time calculation (#19)
1 parent f205648 commit a11ece1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ else
204204
# POSIX-compliant way to show next run time
205205
current_timestamp=$(date +%s)
206206
next_timestamp=$((current_timestamp + RENEWAL_INTERVAL))
207-
next_run=$(date -r "$next_timestamp" '+%Y-%m-%d %H:%M:%S %z' 2>/dev/null || date '+%Y-%m-%d %H:%M:%S %z')
207+
next_run=$(date -d "@$next_timestamp" '+%Y-%m-%d %H:%M:%S %z' 2>/dev/null || date '+%Y-%m-%d %H:%M:%S %z')
208208
echo "Next certificate renewal check will be at ${next_run}"
209209

210210
# Store PID of sleep process and wait for it

0 commit comments

Comments
 (0)