PHP 如果时间在指定时间之前和之后

PHP if a time is after and before specified time

我正在尝试获取从凌晨 12 点到晚上 21 点的时间间隔。 但我不知道该怎么做,也不知道如何把它放在正确的语句中。

嗯,我需要这样的条件语句: 有人可以帮助我吗?

$date = '2016-23-05 13:00:00';

if($date > 12:00:00 and $date < 21:00:00){  
//some functions
}
else{ 
//some functions
}
If(date("His", strtotime($date)) > 120000 && date("His", strtotime($date)) < 210000)