本文整理汇总了PHP中Zend_Date::getTimezoneFromString方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Date::getTimezoneFromString方法的具体用法?PHP Zend_Date::getTimezoneFromString怎么用?PHP Zend_Date::getTimezoneFromString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Date
的用法示例。
在下文中一共展示了Zend_Date::getTimezoneFromString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testZF7202
/**
* @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: testGetTimezoneFromStringForTimezonesWithUnderscore
/**
* @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: testGetTimezoneFromStringForTimezoneOffsetsGreaterThan12
/**
* @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'));
}