feat:[TD-32642] add timezone for connection support

This commit is contained in:
wangmm0220 2024-11-29 10:25:59 +08:00
parent 8629a63c6b
commit 5ee80ac3bb
2 changed files with 20 additions and 8 deletions

View File

@ -185,16 +185,28 @@ TEST(timezoneCase, alter_timezone_Test) {
char *tz_test[] = {
"2023-09-16 17:00:00+",
"2023-09-16 17:00:00+8:",
"2023-09-16 17:00:00+:30",
"2023-09-16 17:00:00+:-30",
"2023-09-16 17:00:00++:-30",
"2023-09-16 17:00:00+a",
"2023-09-16 17:00:00+8",
"2023-09-16 17:00:00+832",
"2023-09-16 17:00:00+8323",
"2023-09-16 17:00:00+:",
"2023-09-16 17:00:00+8:",
"2023-09-16 17:00:00++:",
"2023-09-16 17:00:00+d:",
"2023-09-16 17:00:00+09:",
"2023-09-16 17:00:00+8f:",
"2023-09-16 17:00:00+080:",
"2023-09-16 17:00:00+a",
"2023-09-16 17:00:00+09:",
"2023-09-16 17:00:00+09:a",
"2023-09-16 17:00:00+:30",
"2023-09-16 17:00:00+:3",
"2023-09-16 17:00:00+:093",
"2023-09-16 17:00:00+:-30",
"2023-09-16 17:00:00++:-30",
"2023-09-16 17:00:00+8:8",
"2023-09-16 17:00:00+8:2a",
"2023-09-16 17:00:00+8:08",
"2023-09-16 17:00:00+8:038",
"2023-09-16 17:00:00+08:8",
"2023-09-16 17:00:00+09:3a",
"2023-09-16 17:00:00+09:abc",
"2023-09-16 17:00:00+09:001",
};

View File

@ -131,7 +131,7 @@ int32_t parseFraction(char* str, char** end, int32_t timePrec, int64_t* pFractio
}
#define PARSE(str,len,result) \
if (len > 2 || len < 1) {\
if (len != 2) {\
TAOS_RETURN(TSDB_CODE_INVALID_PARA);\
}\
result = strnatoi(str, len);