php - why does 'today' return extra minutes on the end of a date -


this question has answer here:

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.

http://ideone.com/h2jq0d

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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -