浏览代码

Use mktime

Bo Yang 6 年之前
父节点
当前提交
33dd96c23f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ruby/ext/google/protobuf_c/upb.c

+ 1 - 1
ruby/ext/google/protobuf_c/upb.c

@@ -14325,7 +14325,7 @@ static bool end_timestamp_zone(upb_json_parser *p, const char *ptr) {
   }
 
   /* Normalize tm */
-  seconds = timegm(&p->tm);
+  seconds = mktime(&p->tm) - timezone;
   seconds += 3600 * hours;
 
   /* Check timestamp boundary */