當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Gdata_App_Util::formatTimestamp方法代碼示例

本文整理匯總了PHP中Zend_Gdata_App_Util::formatTimestamp方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Gdata_App_Util::formatTimestamp方法的具體用法?PHP Zend_Gdata_App_Util::formatTimestamp怎麽用?PHP Zend_Gdata_App_Util::formatTimestamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Gdata_App_Util的用法示例。


在下文中一共展示了Zend_Gdata_App_Util::formatTimestamp方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testExceptionFormatTimestampInvalid

 public function testExceptionFormatTimestampInvalid()
 {
     $util = new Zend_Gdata_App_Util();
     try {
         $ts = Zend_Gdata_App_Util::formatTimestamp('nonsense string');
     } catch (Zend_Gdata_App_Exception $e) {
         $this->assertEquals('Invalid timestamp: nonsense string.', $e->getMessage());
     }
 }
開發者ID:jorgenils,項目名稱:zend-framework,代碼行數:9,代碼來源:UtilTest.php

示例2: testStartMinMaxParam

 public function testStartMinMaxParam()
 {
     $this->query->resetParameters();
     $startMin = '2006-10-30';
     $startMax = '2006-11-01';
     $this->query->setUser(self::GOOGLE_DEVELOPER_CALENDAR);
     $this->query->setStartMin($startMin);
     $this->query->setStartMax($startMax);
     $this->assertTrue($this->query->startMin != null);
     $this->assertTrue($this->query->startMax != null);
     $this->assertEquals(Zend_Gdata_App_Util::formatTimestamp($startMin), $this->query->getStartMin());
     $this->assertEquals(Zend_Gdata_App_Util::formatTimestamp($startMax), $this->query->getStartMax());
     $this->query->startMin = null;
     $this->assertFalse($this->query->startMin != null);
     $this->query->startMax = null;
     $this->assertFalse($this->query->startMax != null);
     $this->query->user = null;
     $this->assertFalse($this->query->user != null);
 }
開發者ID:jorgenils,項目名稱:zend-framework,代碼行數:19,代碼來源:EventQueryTest.php

示例3: setRecurrenceExpansionEnd

 /**
  * @return string recurrence-expansion-end
  */
 public function setRecurrenceExpansionEnd($value)
 {
     if ($value != null) {
         $this->_params['recurrence-expansion-end'] = Zend_Gdata_App_Util::formatTimestamp($value);
     } else {
         unset($this->_params['recurrence-expansion-end']);
     }
     return $this;
 }
開發者ID:siite,項目名稱:choose-sa-cloud,代碼行數:12,代碼來源:EventQuery.php

示例4: setPublishedMin

 /**
  * @param string $value
  * @return Zend_Gdata_Query Provides a fluent interface
  */
 public function setPublishedMin($value)
 {
     if ($value != null) {
         $this->_params['published-min'] = Zend_Gdata_App_Util::formatTimestamp($value);
     } else {
         unset($this->_params['published-min']);
     }
     return $this;
 }
開發者ID:sidramaraddy,項目名稱:facebook-albums-challenge,代碼行數:13,代碼來源:Query.php

示例5: testExceptionFormatTimestampInvalidOffsetHours

 public function testExceptionFormatTimestampInvalidOffsetHours()
 {
     $util = new Zend_Gdata_App_Util();
     try {
         $ts = Zend_Gdata_App_Util::formatTimestamp('2007-06-05T02:51:12-ab:00');
     } catch (Zend_Gdata_App_Exception $e) {
         $this->assertEquals('Invalid timestamp: 2007-06-05T02:51:12-ab:00.', $e->getMessage());
         return;
     }
     // Excetion not thrown, this is bad.
     $this->fail("Exception not thrown.");
 }
開發者ID:robertfoleyjr,項目名稱:robertfoleyjr-d6,代碼行數:12,代碼來源:UtilTest.php

示例6: testFormatTimestepHandlesSmallUnixTimestampProperly

 /**
  * @group ZF-11610
  */
 public function testFormatTimestepHandlesSmallUnixTimestampProperly()
 {
     $this->assertEquals('1970-01-01T00:02:03+00:00', Zend_Gdata_App_Util::formatTimestamp(123));
 }
開發者ID:jsnshrmn,項目名稱:Suma,代碼行數:7,代碼來源:UtilTest.php


注:本文中的Zend_Gdata_App_Util::formatTimestamp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。