Jaroslav Huglester Sun Feb 06 20:09:32 -0500 2011

Subject: Different format for created_at/updated_at?

Hello,

can't seem to find the way to change the format of those two fields created_at/updated_at.
I want them to insert just a time() which is an integer of 10 chars.

I even tried $item->created_at = time(); - but it is overwritten by the original created_at()

I also have tried set_created_at() method to return '1297039837'; - but it also overwritten
by some default..

How I could achieve that?

I'm using latest stable...

Thanks


Kien La Sun Feb 06 22:12:01 -0500 2011

Try overriding Model::set_timestamps() with your own version.

https://github.com/kla/php-activerecord/blob/master/lib/Model.php#L1094

Jaroslav Huglester Mon Feb 07 16:32:30 -0500 2011

Thank you very much Kien!

It worked:)

(1-2/2)