Update commonobject.class.php

This commit is contained in:
Laurent Destailleur 2018-04-11 16:27:56 +02:00 committed by GitHub
parent 47d5b1f6fd
commit ca6b7205ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4609,8 +4609,8 @@ abstract class CommonObject
$new_array_options[$key] = $this->db->idate($this->array_options[$key]);
break;
case 'datetime':
// This will convert date to timestamp
if(!is_int($this->array_options[$key])) {
// 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]);