Ver Fonte

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 há 5 anos atrás
pai
commit
a0fb220a8b
1 ficheiros alterados com 1 adições e 1 exclusões
  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
 		 * of expiration by one hour when daylight saving is used
 		 */
 		 */
 		time.tm_isdst = -1;
 		time.tm_isdst = -1;
-		*dst = timelocal(&time);
+		*dst = mktime(&time);
 	}
 	}
 	
 	
 	return 0;
 	return 0;