Skip to content

Commit 36bc08c

Browse files
committed
Fix date for Ubuntu >= 25.10
works for - ubuntu 24.04 - Debian 13 - openbsd 6.6 / 7.x - macos 15.7.1 Fixes #2909
1 parent 3ece1e4 commit 36bc08c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

testssl.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,14 @@ HAS_GNUDATE=false
475475
HAS_FREEBSDDATE=false
476476
HAS_OPENBSDDATE=false
477477
if date -d @735275209 >/dev/null 2>&1; then
478-
if date -r @735275209 >/dev/null 2>&1; then
478+
if date -r 735275209 >/dev/null 2>&1; then
479479
# It can't do any conversion from a plain date output.
480480
HAS_OPENBSDDATE=true
481-
else
481+
elif date -r 735275209 2>&1 | grep -q "No such file"; then
482+
# e.g. Debian 24.04, Debian 11-13
483+
HAS_GNUDATE=true
484+
elif date -r @735275209 >/dev/null 2>&1; then
485+
# Ubuntu >= 25.10
482486
HAS_GNUDATE=true
483487
fi
484488
fi

0 commit comments

Comments
 (0)