how to get new inserted id after onAfterTaskAdd

hi,
gantt.attachEvent(“onAfterTaskAdd”, function(id,task) {

console.log(task);
	});

the id above shows some timestamp value, how can i get the actual row id from the database