1<?php 2 3namespace dokuwiki\Feed; 4 5use SimplePie\Item; 6use SimplePie\SimplePie; 7 8class FeedParserItem extends Item 9{ 10 /** 11 * replace strftime with PHP81_BC\strftime 12 * @inheritdoc 13 * phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps 14 */ 15 public function get_local_date($date_format = '%c') 16 { 17 if (!$date_format) { 18 return $this->sanitize($this->get_date(''), SimplePie::CONSTRUCT_TEXT); 19 } elseif (($date = $this->get_date('U')) !== null && $date !== false) { 20 return \PHP81_BC\strftime($date_format, $date); 21 } 22 23 return null; 24 } 25} 26