fuel/orm — pull request #150 by artbek (2012-05-11 08:24:34+00:00)
Title: FIX typing observer. Accept string as a date.

MODEL:

'updated_at' => array(
'label' => 'Updated At',
'data_type' => 'time_unix',
)

+ TYPING OBSERVER

'Orm\Observer_Typing' => array('before_save', 'after_save', 'after_load'),

Fieldset gets int from the mysql db and displays as date in the form.
But saving doesn't work as currently type_time_encode accepts only Date object - not string from the form.

The patch simply tries to convert supplied $var (if not Date already) to a Date object.