I would like to show a date minus 5 minutes from the current time; my code looks like this:
(date('Y-m-d H:i-5:s'))
but this is not correct because it dumps it:
2012-08-08 13: 27-5: 49
any ideas how i can do this? thank!
PHP function:
strtotime()
Example:
echo date('Y-m-d H:i:s', strtotime('-5 minutes'));
Try it. Solve your problem.
$format = "h:i A"; date_default_timezone_set('Asia/Kolkata'); echo date($format, strtotime("-5 minute"));