提交 9f9e98fd 编写于 作者: X xywang

[TS-471]<fix>: fixed that queries in timezone with DST were incorrect

上级 dfeb7798
...@@ -65,6 +65,8 @@ static void taosGetSystemTimezone() { ...@@ -65,6 +65,8 @@ static void taosGetSystemTimezone() {
struct tm tm1; struct tm tm1;
localtime_r(&tx1, &tm1); localtime_r(&tx1, &tm1);
tsDaylight = daylight;
/* /*
* format example: * format example:
* *
......
...@@ -213,6 +213,8 @@ static void taosGetSystemTimezone() { ...@@ -213,6 +213,8 @@ static void taosGetSystemTimezone() {
int32_t tz = (-timezone * MILLISECOND_PER_SECOND) / MILLISECOND_PER_HOUR; int32_t tz = (-timezone * MILLISECOND_PER_SECOND) / MILLISECOND_PER_HOUR;
tz += daylight; tz += daylight;
tsDaylight = daylight;
/* /*
* format example: * format example:
* *
......
...@@ -91,6 +91,17 @@ static void taosGetSystemTimezone() { ...@@ -91,6 +91,17 @@ static void taosGetSystemTimezone() {
strcpy(tsTimezone, tz); strcpy(tsTimezone, tz);
} }
cfg_timezone->cfgStatus = TAOS_CFG_CSTATUS_DEFAULT; cfg_timezone->cfgStatus = TAOS_CFG_CSTATUS_DEFAULT;
#ifdef _MSC_VER
#if _MSC_VER >= 1900
int64_t timezone = _timezone;
int32_t daylight = _daylight;
char **tzname = _tzname;
#endif
#endif
tsDaylight = daylight;
uInfo("timezone not configured, use default"); uInfo("timezone not configured, use default");
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册