make the timestamp work

add $now var to save the time then created_at and update_at is getting
$now value