From 5c620949f04a4ba449952499793ce13f0a5c5bc3 Mon Sep 17 00:00:00 2001 From: Toni de la Fuente Date: Thu, 17 Dec 2020 15:20:20 +0100 Subject: [PATCH] Update os_detector Change above is because epoch time generator in BSD is 1h less than in Linux --- include/os_detector | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/os_detector b/include/os_detector index db3462ef..f30de3a5 100644 --- a/include/os_detector +++ b/include/os_detector @@ -113,7 +113,9 @@ gnu_convert_date_to_timestamp() { } bsd_convert_date_to_timestamp() { - date -j -f "%Y-%m-%dT%H:%M:%S" "$1" "+%s" + echo $(( $(date -j -f %Y-%m-%dT%H:%M:%S "$1" +%s) + 3600 )) + # Change above is because epoch time generator in BSD is 1h less than in Linux ¯\_(ツ)_/¯ + #date -j -f "%Y-%m-%dT%H:%M:%S" "$1" "+%s" } gnu_test_tcp_connectivity() {