Marian Boricean - 2012-12-24 22:18:09
Hi!
Thank you for your nice class. I tried to do something like that in the past, but I always had difficulties with the leap years, different understading of what a month is (28,30,31 days?)
Anyway, thank you again.
I have an issue now. I set the "start date" to a couple minutes in the past and I have a difference of 5 hours and something. It looks to me that it's reporting the GMT time.
I tried to add the ini_set for the timezone, but no avail:
Here is the code:
<?php
ini_set('date.timezone', 'America/New_York');
$t = new DiffDates();
echo $t->calcdiff('2012-12-24 16:00:00', date('Y-m-d G:i:s'), ' ', 'ymwdhis');
?>
The result is:
5 h 18 m 12 s
The actual current date is 2012-12-24 16:18
What am I missing?