Try adding this to your [DB_DataObject_FormBuilder] ini section:
date_element_format = "Y M d"
Display part is working here. Changed the tablefield from int(11)
to datetime.
From year,month,day and hours everything is saved correct.
Minutes and seconds get lost somewhere and alway set to zero
in the Database.
In ini section i set date_element_format = "d.m.Y H:i:s"
Another thing: if i setup a default date in postGenerateForm,
the date/time is always set to actual date, but saved correctly
in database.
function postGenerateForm(&$form) {
$form->setDefaults(array(
'added' => array(
'd'=>date ('d', time()),
'm'=>date ('m', time()),
'Y'=>date ('Y', time()),
'H'=>date ('H', time()),
'i'=>date ('i', time()),
's'=>date ('s', time())));
'added' is my datetime field.
Any hints?
Regards, Tobias.