scousethemoose
Programmer
Hi heres my problem hopefully someone can point me in the right direction.
I get the current date and time using date("H:i m/d/Y"). I then try to compare it to another date and time I create myself.
eg date("H:i m/d/Y", mktime(21,00,00,11,28,2004))
Heres a scaled down version of my code
For some reason nomatter what I do it evaluates the if as if it were true. Any ideas? Maybe a better alternative I havent considered.
I get the current date and time using date("H:i m/d/Y"). I then try to compare it to another date and time I create myself.
eg date("H:i m/d/Y", mktime(21,00,00,11,28,2004))
Heres a scaled down version of my code
Code:
<?php
$local = date("H:i m/d/Y");
$depart = date("H:i m/d/Y", mktime(21,0,0,11,28,2004));
//compare dates
if($local >= $depart)
{
print 'You have left the country';
}
?>
For some reason nomatter what I do it evaluates the if as if it were true. Any ideas? Maybe a better alternative I havent considered.