diff --git a/lib/index.js b/lib/index.js index e9fa9ce..2821d63 100755 --- a/lib/index.js +++ b/lib/index.js @@ -39,7 +39,8 @@ function generateXML (data){ channel.push({ image: [ {url: data.image_url}, {title: data.title}, {link: data.site_url} ] }); } channel.push({ generator: data.generator }); - channel.push({ lastBuildDate: new Date().toUTCString() }); + if (data.lastBuildDate) + channel.push({ lastBuildDate: data.lastBuildDate }); ifTruePush(data.feed_url, channel, { 'atom:link': { _attr: { href: data.feed_url, rel: 'self', type: 'application/rss+xml' } } }); ifTruePush(data.author, channel, { 'author': { _cdata: data.author } });