FIX timestamp must be an int not a float

This commit is contained in:
Laurent Destailleur 2018-04-17 12:41:13 +02:00
parent d2f0d1f613
commit 7b53ec5198

View File

@ -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;