diff --git a/c/mapping/mlr_val.c b/c/mapping/mlr_val.c index 73b02c919..0db648d75 100644 --- a/c/mapping/mlr_val.c +++ b/c/mapping/mlr_val.c @@ -2,6 +2,7 @@ #include #include #include "lib/mlr_globals.h" +#include "lib/mlrutil.h" #include "mapping/mlr_val.h" // For some Linux distros, in spite of including time.h: @@ -246,7 +247,7 @@ mv_t i_s_gmt2sec_func(mv_t* pval1) { return MV_NULL; } else { strptime(pval1->u.strv, "%Y-%m-%dT%H:%M:%SZ", &tm); - time_t t = timegm(&tm); + time_t t = mlr_timegm(&tm); mv_t rv = {.type = MT_INT, .u.intv = (long long)t}; return rv;