MDL-73692 blocks: Add support for missing timestamps to rss block.

This commit is contained in:
Melanie Treitinger
2023-02-08 11:16:06 +01:00
parent a2b88160d7
commit 1914fe6604
@@ -92,8 +92,11 @@ class renderer extends \plugin_renderer_base {
* @return string
*/
public function format_published_date($timestamp) {
return strftime(get_string('strftimerecentfull', 'langconfig'), $timestamp);
return date('j F Y, g:i a', $timestamp);
if (empty($timestamp)) {
return '';
} else {
return strftime(get_string('strftimerecentfull', 'langconfig'), $timestamp);
}
}
/**