go to bug id or search bugs for
strtotime() can be given a string which only represents a "date", rather than a specific second-granularity on that date, e.g.
$foo = strtotime('25 May 2017');
Since strtotime() returns a timestamp it must decide on a sensible point on that day to use. As far as I can see, all versions (sensibly) assume 00 for any missing time elements, leading the example above to return a timestamp that represents
This follows through if some time elements are given, but not others, e.g.
strtotime('25 May 2017 10pm') => "2017-05-25T22:00:00+00:00"
While it *seems* safe to rely on this behaviour, it would be better to have it as documented behaviour of strtotime().
Documentation clearly indicates how the sub-day elements of the timestamp are constructed in the absence of time information in the input.
Add a Patch
Add a Pull Request
I have added a test case for this: