From 3a8f73adaa5176fdd31b41be7d7ef487d4c647fa Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 15 Mar 2018 06:22:25 +0100 Subject: [PATCH] chore: better debugging for timezone/schedule --- lib/workers/branch/schedule.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/workers/branch/schedule.js b/lib/workers/branch/schedule.js index 714de6d3e0..6e7137cc0a 100644 --- a/lib/workers/branch/schedule.js +++ b/lib/workers/branch/schedule.js @@ -53,7 +53,10 @@ function hasValidSchedule(schedule) { function isScheduledNow(config) { let configSchedule = config.schedule; - logger.debug({ schedule: configSchedule }, `Checking schedule`); + logger.debug( + { schedule: configSchedule, timezone: config.timezone }, + `Checking schedule` + ); if ( !configSchedule || configSchedule.length === 0 || @@ -77,11 +80,13 @@ function isScheduledNow(config) { logger.debug(`now=${now.format()}`); // Adjust the time if repo is in a different timezone to renovate if (config.timezone) { + logger.debug({ timezone: config.timezone }, 'Found timezone'); const [validTimezone, error] = hasValidTimezone(config.timezone); if (!validTimezone) { logger.warn(error); return true; } + logger.debug('Adjusting now for timezone'); now = now.tz(config.timezone); logger.debug(`now=${now.format()}`); } -- GitLab