mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
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:
parent
408df0118a
commit
e98b37e7cf
1 changed files with 3 additions and 1 deletions
|
@ -925,8 +925,10 @@ class Controller extends Object {
|
||||||
unset($this->data[$modelClass][$field['name'] . '_meridian']);
|
unset($this->data[$modelClass][$field['name'] . '_meridian']);
|
||||||
|
|
||||||
$newDate = null;
|
$newDate = null;
|
||||||
if (('datetime' == $field['type'] || 'timestamp' == $field['type']) && $useNewDate) {
|
if ('datetime' == $field['type'] && $useNewDate) {
|
||||||
$newDate = "{$_year}-{$_month}-{$_day}:{$_hour}:{$_min}:{$_sec}";
|
$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) {
|
} else if ('date' == $field['type'] && $useNewDate) {
|
||||||
$newDate = "{$_year}-{$_month}-{$_day}";
|
$newDate = "{$_year}-{$_month}-{$_day}";
|
||||||
} else if ('time' == $field['type'] && $useNewDate) {
|
} else if ('time' == $field['type'] && $useNewDate) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue