2015-10-13 59 views

回答

0
echo date('d/m/Y G', strtotime('-5 hour')) . 'h'; 
1
$dateTime = new DateTime(); 
$dateTime->modify('-5 hours'); 

echo $dateTime->format('d/m/Y h\h'); 

瞭解更多關於DateTime

0

,看一下STRFTIME():

<? 

$time=time(); // This is the time in second from the epoch 
$time -= 3600 * 5; // I subtract 5 hour 
echo strftime("%d/%m/%Y %H", $time); // I print the calculated time 
?> 
相關問題