Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 /**
  * 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);
 }