get_gmdate() public method

Get the posting date/time for the item (UTC time)
See also: get_date
public get_gmdate ( string $date_format = 'j F Y, g:i a' ) : integer | string | null
$date_format string Supports any PHP date format from {@see http://php.net/date}
return integer | string | null
Esempio n. 1
0
 /**
  * Parses a since feed item.
  *
  * @param \Devour\Table\TableInterface $table
  *   A table obeject.
  * @param \SimplePie_Item $item
  *   A SimplePie item.
  */
 protected function parseItem(TableInterface $table, \SimplePie_Item $item)
 {
     // @todo Add more fields.
     $row = $table->getNewRow();
     $row->set('id', $item->get_id())->set('permalink', $item->get_permalink())->set('title', $item->get_title())->set('date', $item->get_gmdate('U'))->set('content', $item->get_content());
     if ($author = $item->get_author()) {
         $row->set('author_name', $author->get_name())->set('author_email', $author->get_email());
     }
 }