From bfddd4f3e9c7b15a0ed2985a8320068198287478 Mon Sep 17 00:00:00 2001 From: hgw Date: Sat, 2 Dec 2023 00:48:08 +1100 Subject: [PATCH] fixing timezone pt. 2 --- commands/feed-predef.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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())