From 165e60a85a841bc99bb860bc8146db8af1a7c325 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 20 Jun 2024 15:51:30 +0200 Subject: [PATCH] chore(userspace/libsinsp): revert `gmt2local` changes. Signed-off-by: Federico Di Pierro --- userspace/libsinsp/utils.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/userspace/libsinsp/utils.cpp b/userspace/libsinsp/utils.cpp index c40742f3d27..b14c8209b8f 100644 --- a/userspace/libsinsp/utils.cpp +++ b/userspace/libsinsp/utils.cpp @@ -968,13 +968,7 @@ void sinsp_utils::ts_to_string(uint64_t ts, std::string* res, bool date, bool ns time_t Time; uint64_t sec = ts / ONE_SECOND_IN_NS; uint64_t nsec = ts % ONE_SECOND_IN_NS; - thread_local int32_t thiszone = -1; - - if (thiszone == -1) - { - thiszone = gmt2local(0); - } - + int32_t thiszone = gmt2local(0); int32_t s = (sec + thiszone) % 86400; int32_t bufsize = 0; char buf[256];