How to automate timestamps in ActiveRecord models

Comparing #9 with #13

Content

There are many ways to automate the setting of timestamps in yii ActiveRecord models. Two of them ahree are presented here: 1. Via rules() 2. Via beforeSave()  
3. Via CTimestampBehavior (zii)


To start off we need to create a database table.
[...]
These are simple and elegant solutions to this issue.
 
 
The third possibility is to use CTimestampBehavior in your models. You can read about this in the API documentation:
 
[http://www.yiiframework.com/doc/api/1.1/CTimestampBehavior](http://www.yiiframework.com/doc/api/1.1/CTimestampBehavior "Yii API: CTimestampBehavior")