time() restituisce un timestamp in stile UNIX, ovvero un intero che rappresenta il numero di secondi dal 1/1/1970, quindi non è in formato aaaa-mm-dd hh:mm:ss
fa così e vedi che dovrebbe andare
$datainvio = date('Y-m-d H:i:s',time());
time() restituisce un timestamp in stile UNIX, ovvero un intero che rappresenta il numero di secondi dal 1/1/1970, quindi non è in formato aaaa-mm-dd hh:mm:ss
fa così e vedi che dovrebbe andare
$datainvio = date('Y-m-d H:i:s',time());