fix(timezone): taos_options apply new timezone

This commit is contained in:
Alex Duan 2022-11-14 11:41:11 +08:00
parent 8bfcebb60a
commit 2dd1e05cf0
1 changed files with 7 additions and 1 deletions

View File

@ -271,8 +271,14 @@ static int32_t cfgSetTimezone(SConfigItem *pItem, const char *value, ECfgSrcType
cfgStypeStr(stype), value, terrstr());
return -1;
}
pItem->stype = stype;
// apply new timezone
char szTimezone[TD_TIMEZONE_LEN] = {0};
int8_t dl;
enum TdTimezone tdOffset = TdZeroZone;
taosSetSystemTimezone(value, szTimezone, &dl, &tdOffset);
return 0;
}