mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
Merge pull request #1906 from drwetter/tz_fix+3.0
Display time as suggested in utc (3.0)
This commit is contained in:
commit
96e8f67999
@ -1871,10 +1871,12 @@ wait_kill(){
|
||||
return 3 # means killed
|
||||
}
|
||||
|
||||
# parse_date date format input-format
|
||||
# Convert date formats -- we always use GMT=UTC here
|
||||
# argv1: source date string
|
||||
# argv2: dest date sting
|
||||
if "$HAS_GNUDATE"; then # Linux and NetBSD
|
||||
parse_date() {
|
||||
LC_ALL=C date -d "$1" "$2"
|
||||
LC_ALL=C TZ=GMT date -d "$1" "$2"
|
||||
}
|
||||
elif "$HAS_FREEBSDDATE"; then # FreeBSD, OS X and newer (~6.6) OpenBSD versions
|
||||
parse_date() {
|
||||
@ -1896,7 +1898,7 @@ elif "$HAS_OPENBSDDATE"; then
|
||||
}
|
||||
else
|
||||
parse_date() {
|
||||
LC_ALL=C date -j "$2" "$1"
|
||||
LC_ALL=C TZ=GMT date -j "$2" "$1"
|
||||
}
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user