[eluser]winter[/eluser]
Sorry to resurect this thread. I've been trying to use CI's now() function or even PHP's time() function with CI's ActiveRecord to insert a date into a datetime field in a mysql table. The only way I could get it to work was doing:
$timenow = now();
$this->created = unix_to_human($timenow, TRUE, 'eu');
$this->db->insert('users', $this);
This is my first time using ActiveRecord. It's a bit confusing to me because of the various ways to do the same thing. I guess there might be a problem there. Because a plain SQL insert using NOW() worked fine.
Anyway, if anyone can let me know why I'm having issue, that would be nice. I'll use the above method for now.
Cheers!