Skip to content

Commit 96e8f67

Browse files
authored
Merge pull request #1906 from drwetter/tz_fix+3.0
Display time as suggested in utc (3.0)
2 parents c0d9427 + f6a9044 commit 96e8f67

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

testssl.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,10 +1871,12 @@ wait_kill(){
18711871
return 3 # means killed
18721872
}
18731873

1874-
# parse_date date format input-format
1874+
# Convert date formats -- we always use GMT=UTC here
1875+
# argv1: source date string
1876+
# argv2: dest date sting
18751877
if "$HAS_GNUDATE"; then # Linux and NetBSD
18761878
parse_date() {
1877-
LC_ALL=C date -d "$1" "$2"
1879+
LC_ALL=C TZ=GMT date -d "$1" "$2"
18781880
}
18791881
elif "$HAS_FREEBSDDATE"; then # FreeBSD, OS X and newer (~6.6) OpenBSD versions
18801882
parse_date() {
@@ -1896,7 +1898,7 @@ elif "$HAS_OPENBSDDATE"; then
18961898
}
18971899
else
18981900
parse_date() {
1899-
LC_ALL=C date -j "$2" "$1"
1901+
LC_ALL=C TZ=GMT date -j "$2" "$1"
19001902
}
19011903
fi
19021904

0 commit comments

Comments
 (0)