diff --git a/module/idoutils/src/db.c b/module/idoutils/src/db.c index 69acd4a..1d435f5 100644 --- a/module/idoutils/src/db.c +++ b/module/idoutils/src/db.c @@ -2440,7 +2440,7 @@ char *ido2db_db_timet_to_sql(ido2db_idi *idi, time_t t) { * set the value explicitely to NULL. mysql, you suck hard. */ if (t == 0) { - if (asprintf(&buf, "FROM_UNIXTIME(NULL)") == -1) + if (asprintf(&buf, "'0000-00-00 00:00:00'") == -1) buf = NULL; } else { if (asprintf(&buf, "FROM_UNIXTIME(%lu)", (unsigned long) t) == -1)