From 7b53ec5198c873b49463ea53fd35f8e35509df88 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Apr 2018 12:41:13 +0200 Subject: [PATCH] FIX timestamp must be an int not a float --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 20c4a3ff582..45d7f185d49 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2015,7 +2015,7 @@ function dol_now($mode='gmt') { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $tzsecond=getServerTimeZoneInt('now'); // Contains tz+dayling saving time - $ret=(int) dol_now('gmt')+($tzsecond*3600); + $ret=(int) (dol_now('gmt')+($tzsecond*3600)); } /*else if ($mode == 'tzref') // Time for now with parent company timezone is added { @@ -2028,7 +2028,7 @@ function dol_now($mode='gmt') //print 'time: '.time().'-'.mktime().'-'.gmmktime(); $offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60; $offsetdst=(empty($_SESSION['dol_dst'])?0:$_SESSION['dol_dst'])*60*60; - $ret=(int) dol_now('gmt')+($offsettz+$offsetdst); + $ret=(int) (dol_now('gmt')+($offsettz+$offsetdst)); } return $ret;