2
0
forked from Wavyzz/dolibarr

Fix for PHP < 5.3

This commit is contained in:
Laurent Destailleur
2012-06-05 12:27:42 +02:00
parent 50f3e480c9
commit dadc36ad18
2 changed files with 2 additions and 2 deletions

View File

@@ -960,7 +960,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
if ($second< 0 || $second > 60) return '';
}
if (class_exists('DateTime') && ! empty($conf->global->MAIN_NEW_DATE))
if (method_exists('DateTime','getTimestamp') && ! empty($conf->global->MAIN_NEW_DATE))
{
if (empty($gm)) $localtz = new DateTimeZone(date_default_timezone_get());
else $localtz = new DateTimeZone('UTC');