2
0
forked from Wavyzz/dolibarr

Fix: avoid php E_STRICT errors and compatibility with php 5.4

This commit is contained in:
Regis Houssin
2012-03-21 02:12:44 +01:00
parent c0013a4581
commit 52a8216e3e
6 changed files with 59 additions and 19 deletions

View File

@@ -1101,8 +1101,8 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
function dol_now($mode='gmt')
{
// Note that gmmktime and mktime return same value (GMT) whithout parameters
if ($mode == 'gmt') $ret=gmmktime(); // Time for now at greenwich.
else if ($mode == 'tzserver') // Time for now with PHP server timezone added
if ($mode == 'gmt') $ret=time(); // Time for now at greenwich.
else if ($mode == 'tzserver') // Time for now with PHP server timezone added
{
require_once(DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php');
$tzsecond=getServerTimeZoneInt(); // Contains tz+dayling saving time