Merge pull request #23052 from Easya-Solutions/fix-commonoject-insert-extra-fields-datetime
FIX insert extra fields when date time is a timestamp as string
This commit is contained in:
commit
c669ba9cc1
@ -6270,7 +6270,7 @@ abstract class CommonObject
|
||||
case 'date':
|
||||
case 'datetime':
|
||||
// If data is a string instead of a timestamp, we convert it
|
||||
if (!is_int($this->array_options[$key])) {
|
||||
if (!is_numeric($this->array_options[$key]) || $this->array_options[$key] != intval($this->array_options[$key])) {
|
||||
$this->array_options[$key] = strtotime($this->array_options[$key]);
|
||||
}
|
||||
$new_array_options[$key] = $this->db->idate($this->array_options[$key]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user