From ca6b7205efe3e5fad2e9a127f25b7dbd6ba0d42c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Apr 2018 16:27:56 +0200 Subject: [PATCH] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5057b21a74e..11170a362f5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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]);