提交 e814ec4c 编写于 作者: weixin_48148422's avatar weixin_48148422

fix #349

上级 09e60946
......@@ -142,21 +142,15 @@ int32_t parseTimezone(char* str, int64_t* tzOffset) {
i += 2;
}
if (hour > 12) {
int64_t minute = strnatoi(&str[i], 2);
if (minute > 59) {
return -1;
}
int64_t sec = strnatoi(&str[i], 2);
if (sec > 70) {
return -1;
}
sec += (hour * 3600);
if (str[0] == '+') {
*tzOffset = -sec;
*tzOffset = -(hour * 3600 + minute * 60);
} else {
*tzOffset = sec;
*tzOffset = hour * 3600 + minute * 60;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册