$x = "18:00"; $y = "22:00"; //list($hour_enter,$minute_enter)= split('[:]', $x); list($hour_leave,$minute_leave)= split('[:]', $y); date_default_timezone_set('Europe/Lisbon'); $now= gmdate("H"); $z = $hour_leave-$now; if($z > 0) echo "he's still working"; else echo "he already left";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)