I have a code where I'm using strtotime() to get the date timestamp in PHP.
Have encountered a weird response of it.
Case 1. I got a date like "Tue Jul 2 6pm" : strtotime gives bool(false).
<?php $case1 = strtotime("Tue July 2 6pm");
var_dump($case1);
?>
Case 2. If the date is like "Tue Jul 2 6:00pm" :strtotime gives timestamp "1562115600" taking year as current year.
<?php $case2 = strtotime("Tue July 2 6:00pm");
var_dump($case2);
?>
Can anyone help me out. Why did strtotime gave bool(false) for the first case ?
What can be done to fix this, Please help ?