Additional timestamp fix for Controller::cleanUpFields()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4729 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-04-01 07:47:56 +00:00
parent 408df0118a
commit e98b37e7cf

View file

@ -925,8 +925,10 @@ class Controller extends Object {
unset($this->data[$modelClass][$field['name'] . '_meridian']);
$newDate = null;
if (('datetime' == $field['type'] || 'timestamp' == $field['type']) && $useNewDate) {
if ('datetime' == $field['type'] && $useNewDate) {
$newDate = "{$_year}-{$_month}-{$_day}:{$_hour}:{$_min}:{$_sec}";
} else if ('timestamp' == $field['type'] && $useNewDate) {
$newDate = "{$_year}-{$_month}-{$_day} {$_hour}:{$_min}:{$_sec}";
} else if ('date' == $field['type'] && $useNewDate) {
$newDate = "{$_year}-{$_month}-{$_day}";
} else if ('time' == $field['type'] && $useNewDate) {