Q:

strtotime minus hours and minutes

I have this code:
<?php 
    $date = date('Y-m-d H:i:s', strtotime('-6 hours', (int)get_the_time('U'))); 
    echo $date; 
?>

as you can see the time is changed by subtracting 6 hours from the time, what I want to subtract the hours and also minutes so I tried this:
<?php 
    $date = date('Y-m-d H:i:s', strtotime('-6 hours', '-23 minutes', (int)get_the_time('U'))); 
    echo $date; 
?>

But isn't working, any idea?
Thank you in advance

A:

The strtotime function expecting only 2 parameters.
int strtotime ( string $time [, int $now = time() ] )

So you should try the following format:
$date = strtotime('-6 hours, -43 minutes', $time);

Tested Code:
<?php
$time = time();
$date = strtotime('-6 hours', $time);
echo date('d-m-y H:i', $time);
echo date('d-m-y H:i', $date);

$date = strtotime('-6 hours, -43 minutes', $time);
echo date('d-m-y H:i', $time);
echo date('d-m-y H:i', $date);

Output:
19-10-17 00:44
18-10-17 18:44

19-10-17 00:44
18-10-17 18:01

