protected function _getTimePublishedInUnixTime($index)
 {
     $publishedNode = $this->_relativeQuery($index, 'media:group/yt:uploaded');
     if ($publishedNode->length == 0) {
         return '';
     }
     $rawTime = $publishedNode->item(0)->nodeValue;
     return org_tubepress_impl_util_TimeUtils::rfc3339toUnixTime($rawTime);
 }
Exemplo n.º 2
0
 function testRfc3339toUnixTime()
 {
     $result = org_tubepress_impl_util_TimeUtils::rfc3339toUnixTime('1980-11-03T09:03:33.000-05:00');
     $this->assertEquals('342108213', $result);
 }