Hi I've search the internet about this topics and seems can't give me the right ouput? What could I be doing doing wrong? I want to output the remaining days from an expiration period with hours and minutes.
Here's what I've done,
$date_expire = '2014-09-12 23:59:59';
$date = new DateTime($date_expire);
$now = new DateTime();
echo $date->diff($now)->format("%d days, %H hours and %i minutes");
I am from the philippines and the current date and time I wrote this is August 13, 2014 5:26pm the ouput gives me 29 days, 12 hours and 30 minutes. Which is think is wrong? Can you help me? thanks!