setTimezone() public method

See also: http://www.php.net/manual/en/timezones.php
public setTimezone ( string $timezone )
$timezone string
Beispiel #1
0
 public function testLoadFromStringWithDtend()
 {
     $string = 'FREQ=MONTHLY;DTEND=20140422T140000';
     $this->rule->setTimezone('America/Los_Angeles');
     $this->rule->loadFromString($string);
     $expectedEndDate = new \DateTime('2014-04-22 14:00:00', new \DateTimeZone('America/Los_Angeles'));
     $this->assertEquals(Frequency::MONTHLY, $this->rule->getFreq());
     $this->assertEquals($expectedEndDate, $this->rule->getEndDate());
 }