php - why does 'today' return extra minutes on the end of a date -
this question has answer here:
- php strtotime problems minutes [closed] 4 answers
i need first , last second of given day in php. when use this:
$date2 = strtotime('today'); echo date('y-m-d h:m:s', $date2) . "</br>";
i 2013-03-24 12:03:00
. why 3 minutes? should 12:00:00
. need solution can work every single time in weird leap year scenarios because code initiate payments.
in php
m
months not minutes
replace
echo date('y-m-d h:m:s', $date2) ^--------------------- months
with
echo date('y-m-d h:i:s', $date2) ^--------------------- correct value
Comments
Post a Comment