From 915906c6e0f8339a9eba6be34d0c04c7daf9efdc Mon Sep 17 00:00:00 2001 From: sathis Date: Wed, 23 Sep 2015 14:43:15 +0530 Subject: [PATCH] Dont auto generate last build date --- lib/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index e9fa9ce5..2821d63a 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 } });