Caclulating future date in php using time()

juliaistevens

New Member
I'm trying to show the time 10 days from now. I can't figure out what I'm doing wrong!!\[code\]$now = time();$est = ($now - (60 * 60 * 4)); // subtract 4 hours$later = ($est + (60*60*24*10));$show_now = date('M m, Y h:i:s A', $est); // correct$show_later = date('M m, Y h:i:s A', $later); // showing same as above...WHY!?echo "now: ".$show_now."<br />later: ".$show_later;\[/code\]Both echo the same time. Why?
 
Back
Top