Merge pull request #2442 from delcroip/patch-2
FIX: jdate returning -62169955200 on x64 machine
This commit is contained in:
commit
52e9ae5fe4
@ -275,6 +275,8 @@ abstract class DoliDB implements Database
|
||||
*/
|
||||
function jdate($string, $gm=false)
|
||||
{
|
||||
if($string==0 || $string=="0000-00-00 00:00:00")
|
||||
return NULL;
|
||||
$string=preg_replace('/([^0-9])/i','',$string);
|
||||
$tmp=$string.'000000';
|
||||
$date=dol_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),$gm);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user