From 1af09ec91b295d58488fc5403f98ce5429fb0436 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 9 Oct 2022 18:18:48 +0800 Subject: [PATCH] opt log time --- source/util/src/tlog.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index 05f2ba095c..ef21e5b29f 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -118,11 +118,12 @@ static FORCE_INLINE long taosGetTimeZone() { #if defined(__linux__) || defined(__sun) return timezone; #else - struct timeval tv; - struct timezone tz; - gettimeofday(&tv, &tz); - return tz.tz_minuteswest * 60L; + // struct timeval tv; + // struct timezone tz; + // gettimeofday(&tv, &tz); + + // return tz.tz_minuteswest * 60L; #endif } static FORCE_INLINE void taosUpdateDaylight() { @@ -445,7 +446,6 @@ static inline int32_t taosBuildLogHead(char *buffer, const char *flags) { taosGetTimeOfDay(&timeSecs); time_t curTime = timeSecs.tv_sec; - // ptm = taosLocalTime(&curTime, &Tm); ptm = taosLocalTimeNolock(&Tm, &curTime, taosGetTimeZone(), taosGetDaylight()); return sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d %08" PRId64 " %s", ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour,