Skip to content

Commit 0b9715c

Browse files
authored
Merge pull request #2930 from testssl/fix_2929
Fix date parsing bc of locale problem
2 parents d3a96d9 + da436e7 commit 0b9715c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

testssl.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,12 @@ declare TLS13_OSSL_CIPHERS="TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CH
476476
HAS_GNUDATE=false
477477
HAS_FREEBSDDATE=false
478478
HAS_OPENBSDDATE=false
479+
479480
if date -d @735275209 >/dev/null 2>&1; then
480481
if date -r @735275209 >/dev/null 2>&1; then
481482
# Ubuntu >= 25.10
482483
HAS_GNUDATE=true
483-
elif date -r 735275209 2>&1 | grep -q "No such file"; then
484+
elif LC_ALL=C date -r 735275209 2>&1 | grep -q "No such file"; then
484485
# e.g. Debian 24.04, Debian 11-13
485486
HAS_GNUDATE=true
486487
elif date -r 735275209 >/dev/null 2>&1; then
@@ -492,6 +493,7 @@ fi
492493
date -j -f '%s' 1234567 >/dev/null 2>&1 && \
493494
HAS_FREEBSDDATE=true
494495

496+
495497
echo A | sed -E 's/A//' >/dev/null 2>&1 && \
496498
declare -r HAS_SED_E=true || \
497499
declare -r HAS_SED_E=false

0 commit comments

Comments
 (0)