Merge pull request #12289 from frederic34/datetime

php is > 5.4
This commit is contained in:
Laurent Destailleur 2019-11-02 11:46:34 +01:00 committed by GitHub
commit d9f333d828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1991,8 +1991,6 @@ function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = false, $
if ($second< 0 || $second > 60) return ''; if ($second< 0 || $second > 60) return '';
} }
if (method_exists('DateTime', 'getTimestamp'))
{
if (empty($gm) || $gm === 'server') if (empty($gm) || $gm === 'server')
{ {
$default_timezone=@date_default_timezone_get(); // Example 'Europe/Berlin' $default_timezone=@date_default_timezone_get(); // Example 'Europe/Berlin'
@ -2036,12 +2034,6 @@ function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = false, $
//var_dump($date); //var_dump($date);
return $date; return $date;
} }
else
{
dol_print_error('', 'PHP version must be 5.4+');
return '';
}
}
/** /**