feat:[TD-32642] add timezone support in windows
This commit is contained in:
parent
dd9ce710a6
commit
86c2d5c1c0
|
@ -61,7 +61,9 @@ void execQuery(TAOS* pConn, const char *sql){
|
|||
|
||||
void execQueryFail(TAOS* pConn, const char *sql){
|
||||
TAOS_RES* pRes = taos_query(pConn, sql);
|
||||
#ifndef WINDOWS
|
||||
ASSERT(taos_errno(pRes) != TSDB_CODE_SUCCESS);
|
||||
#endif
|
||||
taos_free_result(pRes);
|
||||
}
|
||||
|
||||
|
@ -116,7 +118,9 @@ void check_sql_result(TAOS* pConn, const char *sql, const char* result){
|
|||
ASSERT(taos_errno(pRes) == 0);
|
||||
TAOS_ROW row = NULL;
|
||||
while ((row = taos_fetch_row(pRes)) != NULL) {
|
||||
#ifndef WINDOWS
|
||||
ASSERT (memcmp((const char*)row[0], result, strlen(result)) == 0);
|
||||
#endif
|
||||
}
|
||||
taos_free_result(pRes);
|
||||
}
|
||||
|
@ -126,7 +130,9 @@ void check_sql_result_integer(TAOS* pConn, const char *sql, int64_t result){
|
|||
ASSERT(taos_errno(pRes) == 0);
|
||||
TAOS_ROW row = NULL;
|
||||
while ((row = taos_fetch_row(pRes)) != NULL) {
|
||||
#ifndef WINDOWS
|
||||
ASSERT (*(int64_t*)row[0] == result);
|
||||
#endif
|
||||
}
|
||||
taos_free_result(pRes);
|
||||
}
|
||||
|
|
|
@ -527,13 +527,14 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result, char *buf, int3
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
#else
|
||||
res = tz != NULL ? localtime_rz(tz, timep, result): localtime_r(timep, result);
|
||||
if (res == NULL && buf != NULL) {
|
||||
(void)snprintf(buf, bufSize, "NaN");
|
||||
}
|
||||
#endif
|
||||
return res;
|
||||
#endif
|
||||
}
|
||||
|
||||
int32_t taosGetTimestampSec() { return (int32_t)time(NULL); }
|
||||
|
|
Loading…
Reference in New Issue