示例#1
0
文件: DateTest.php 项目: netvlies/zf
 /**
  * @ZF-7202
  */
 public function testZF7202()
 {
     $date = new Zend_Date();
     $timezone = $date->getTimezoneFromString('03:58:09 Jul 06, 2009 Indian/Reunion');
     $this->assertSame('Indian/Reunion', $timezone);
 }
示例#2
0
 /**
  * @group GH-2
  */
 public function testGetTimezoneFromStringForTimezonesWithUnderscore()
 {
     $date = new Zend_Date();
     $this->assertEquals('America/Los_Angeles', $date->getTimezoneFromString('America/Los_Angeles'));
     $this->assertEquals('America/New_York', $date->getTimezoneFromString('America/New_York'));
 }
示例#3
0
 /**
  * @group ZF-11846
  */
 public function testGetTimezoneFromStringForTimezoneOffsetsGreaterThan12()
 {
     $date = new Zend_Date();
     $this->assertEquals('Etc/GMT-13', $date->getTimezoneFromString('18:00:00+1300'));
     $this->assertEquals('Etc/GMT-14', $date->getTimezoneFromString('18:00:00+1400'));
 }