Merge pull request #8551 from ATM-Nicolas/fix_datetime_extrafields

FIX : update wrong datetime extrafield
This commit is contained in:
Laurent Destailleur 2018-04-11 16:28:04 +02:00 committed by GitHub
commit 23dba46c8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4609,6 +4609,10 @@ abstract class CommonObject
$new_array_options[$key] = $this->db->idate($this->array_options[$key]);
break;
case 'datetime':
// If data is a string instead of a timestamp, we convert it
if (! is_int($this->array_options[$key])) {
$this->array_options[$key] = strtotime($this->array_options[$key]);
}
$new_array_options[$key] = $this->db->idate($this->array_options[$key]);
break;
case 'link':