Edited to simplify code example
Well, after migrating everything over to beta3, I'd say the problem still exists.
Here's how I have things setup:
Event.php
(NOTE: This is inherited from GalleryObject.php as I have onAfterWrite methods that apply to a number of classes.
The 'BeginDT' and 'EndingDT' fields I added to see if using the SS_Datetime fields would make a difference.
class Event extends GalleryObject {
private static $db = array(
'Name' => 'Varchar(75)',
'Description' => 'Text',
'StartDate' => 'Date',
'EndDate' => 'Date',
'StartTime' => 'Time',
'EndTime' => 'Time'
);
public function getCMSFields() {
$fields = parent::getCMSFields();
// ...
$startDate = new DateField('StartDate', 'Starting Date');
$startDate->setConfig('showcalendar', true);
$fields->addFieldToTab('Root.Main', $startDate);
$endingDate = new DateField('EndDate', 'Ending Date');
$endingDate->setConfig('showcalendar', true);
$fields->addFieldToTab('Root.Main', $endingDate);
// When 'PM' values are entered into these fields, they get converted to 'AM' once saved
$fields->addFieldToTab('Root.Main', new TimeField('StartTime', 'Starting Time'));
$fields->addFieldToTab('Root.Main', new TimeField('EndTime', 'Ending Time'));
return $fields;
}
}
There is an EventAdmin.php file which extends ModelAdmin to manage Event entries, which is setup to only manage Event objects.
Is there something ridiculous I'm doing here?
Regardless of what 'PM' type value I put into either StartTime, EndTime, or the time fields of BeginDT or EndingDT - the CMS ignores these values and stores the times as the 'AM' equivelant.