DateTime::getTimestamp() only exists in PHP > 5.3.0

This commit is contained in:
mark_story 2012-10-27 22:49:43 -04:00
parent e8f727fe68
commit 667dfd308f

View file

@ -518,7 +518,7 @@ class CakeTimeTest extends CakeTestCase {
$yourTimezone = new DateTimeZone($timezone);
$yourTime = new DateTime($date, $yourTimezone);
$userOffset = $yourTimezone->getOffset($yourTime) / HOUR;
$time = $yourTime->getTimestamp();
$time = $yourTime->format('U');
$this->assertEquals($yourTime->format('r'), $this->Time->toRss($time, $userOffset), "Failed on $timezone");
$this->assertEquals($yourTime->format('r'), $this->Time->toRss($time, $timezone), "Failed on $timezone");
}