function testGetDateTimeCached() { $tz = new \DateTimeZone('Europe/Amsterdam'); $dt = new \DateTimeImmutable('1985-07-04 01:30:00', $tz); $dt->setTimeZone($tz); $elem = $this->vcal->createProperty('DTSTART'); $elem->setDateTime($dt); $this->assertEquals($elem->getDateTime(), $dt); }
/** * String representation of a PeriodLib using ISO8601 Time interval format * * @return string */ public function __toString() { $utc = new DateTimeZone('UTC'); return $this->startDate->setTimeZone($utc)->format(self::DATE_ISO8601) . '/' . $this->endDate->setTimeZone($utc)->format(self::DATE_ISO8601); }