diff --git a/userspace/libsinsp/utils.cpp b/userspace/libsinsp/utils.cpp index c40742f3d2..b14c8209b8 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];