I attempted this:
$date_string = strtotime('6 Mar, 2011 23:59:59');
But I think PHP can’t interpret that for some reason as it returned empty. I tried this:
$date_string = strtotime('6 Mar, 2011 midnight');
The above worked but I need it to be a second before midnight i.e. the last second of the day. How can I get strtotime to return this without changing the 6 Mar, 2011 part?
It works for me if I use
March 6, 2011 23:59:59. Any chance of changing the input format?Other than that, you could of course subtract 1 second from the timestamp. Note however that you need to use March 7: