Skip to content

Commit da436e7

Browse files
committed
Fix date parsing bc of locale problem
The new block making sure that rust coreutils work properly (PR #2913) introduced a new check in order to determine which date functions to use. The function however parsed only for English error messages ("No such file"). This PR fixes that by setting LC_ALL to C. Fixes #2929 .
1 parent d3a96d9 commit da436e7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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)