diff --git a/commands/feed-predef.js b/commands/feed-predef.js index ca46f33..1c72b15 100644 --- a/commands/feed-predef.js +++ b/commands/feed-predef.js @@ -91,9 +91,9 @@ async function twitter(feedURL, n, nick) { if (data.isoDate !== undefined) { var date = moment(data.isoDate) - if (uconfig[nick].timezone != undefined) { + try { var syncDate = date.tz(uconfig[nick].timezone) - } else { + } catch(e) { var syncDate = date.tz(config.feed.timezone) } consoleLog('[feed-predef.twitter] Got tweet from '+syncDate.format())