diff --git a/lib/middleware/template.js b/lib/middleware/template.js index 01568c2a3..69ae580e7 100644 --- a/lib/middleware/template.js +++ b/lib/middleware/template.js @@ -44,6 +44,10 @@ module.exports = async (ctx, next) => { } } + if (!item.pubDate) { + item.pubDate = new Date().toISOString(); + } + if (item.enclosure_length) { const itunes_duration = Math.floor(item.enclosure_length / 3600) + ':' + (Math.floor((item.enclosure_length % 3600) / 60) / 100).toFixed(2).slice(-2) + ':' + (((item.enclosure_length % 3600) % 60) / 100).toFixed(2).slice(-2);