Tell me how to display as short as possible on php

echo (date("d MY в H:i")); 

with a random offset in minutes from the current time, for example, take 34 minutes?

    2 answers 2

    time

     $time = time() - 34 * 60; // секунды echo date('d MY в H:i', $time); 

    strtotime

     $time = strtotime('-34 minutes'); echo date('d MY в H:i', $time); 

    Datetime

     $date = new \DateTime('-34 minutes'); echo $date->format('d MY в H:i'); 
       echo (date("d MY в H:i", time()-34));