getTimezone() public method

Get timezone to use for \DateTime() objects that are UTC.
public getTimezone ( ) : null | string
return null | string
Exemplo n.º 1
0
 public function testTimezoneObtainedFromStartDate()
 {
     $startDate = new \DateTime('2014-01-25 05:20:30', new \DateTimeZone('America/Los_Angeles'));
     $this->rule = new Rule(null, $startDate);
     $this->assertEquals($startDate->getTimezone()->getName(), $this->rule->getTimezone());
 }