浏览代码

db2_local: replace timelocal() with mktime()

- timelocal() is nonstandard GNU extension, not recommended to be used
and mktime() should be equivalent:
  * https://linux.die.net/man/3/timegm
- GH #2298
Daniel-Constantin Mierla 5 年之前
父节点
当前提交
a0fb220a8b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/modules/db2_ldap/ld_fld.c

+ 1 - 1
src/modules/db2_ldap/ld_fld.c

@@ -270,7 +270,7 @@ static inline int ldap_gentime2db_datetime(time_t* dst, str* src)
 		 * of expiration by one hour when daylight saving is used
 		 */
 		time.tm_isdst = -1;
-		*dst = timelocal(&time);
+		*dst = mktime(&time);
 	}
 	
 	return 0;