opt log time
This commit is contained in:
parent
03f4412916
commit
1af09ec91b
|
@ -118,11 +118,12 @@ static FORCE_INLINE long taosGetTimeZone() {
|
||||||
#if defined(__linux__) || defined(__sun)
|
#if defined(__linux__) || defined(__sun)
|
||||||
return timezone;
|
return timezone;
|
||||||
#else
|
#else
|
||||||
struct timeval tv;
|
|
||||||
struct timezone tz;
|
|
||||||
|
|
||||||
gettimeofday(&tv, &tz);
|
// struct timeval tv;
|
||||||
return tz.tz_minuteswest * 60L;
|
// struct timezone tz;
|
||||||
|
// gettimeofday(&tv, &tz);
|
||||||
|
|
||||||
|
// return tz.tz_minuteswest * 60L;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
static FORCE_INLINE void taosUpdateDaylight() {
|
static FORCE_INLINE void taosUpdateDaylight() {
|
||||||
|
@ -445,7 +446,6 @@ static inline int32_t taosBuildLogHead(char *buffer, const char *flags) {
|
||||||
|
|
||||||
taosGetTimeOfDay(&timeSecs);
|
taosGetTimeOfDay(&timeSecs);
|
||||||
time_t curTime = timeSecs.tv_sec;
|
time_t curTime = timeSecs.tv_sec;
|
||||||
// ptm = taosLocalTime(&curTime, &Tm);
|
|
||||||
ptm = taosLocalTimeNolock(&Tm, &curTime, taosGetTimeZone(), taosGetDaylight());
|
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,
|
return sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d %08" PRId64 " %s", ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour,
|
||||||
|
|
Loading…
Reference in New Issue