I would like to show me the date minus 5 minutes from the current time; my code is like this:
(date('Y-m-d H:i-5:s'))
but it's not correct because var_dump
produces:
2012-08-08 13:27-5:49
Any ideas on how can I do this?
I would like to show me the date minus 5 minutes from the current time; my code is like this:
(date('Y-m-d H:i-5:s'))
but it's not correct because var_dump
produces:
2012-08-08 13:27-5:49
Any ideas on how can I do this?
Try this It's solve your problem
$format = "h:i A";
date_default_timezone_set('Asia/Kolkata');
echo date($format, strtotime("-5 minute"));