From 8ad7d94c810bfc62f1c2a57bab7f6854ddf30038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Thu, 6 Oct 2022 17:27:03 +0200 Subject: [PATCH] Fix timezone --- standup-mattermost-bot/source/jobs.ts | 1 + standup-mattermost-bot/source/jobs/daily-stand-up.ts | 1 + standup-mattermost-bot/source/jobs/weekly-randomizer.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/standup-mattermost-bot/source/jobs.ts b/standup-mattermost-bot/source/jobs.ts index faadd10d4..1bf9f389c 100644 --- a/standup-mattermost-bot/source/jobs.ts +++ b/standup-mattermost-bot/source/jobs.ts @@ -35,6 +35,7 @@ if (badJob >= 0) { const bree = new Bree({ root: join(__dirname, 'jobs'), defaultExtension: NODE_ENV === 'production' ? 'js' : 'ts', + timezone: 'Europe/Paris', jobs, }) diff --git a/standup-mattermost-bot/source/jobs/daily-stand-up.ts b/standup-mattermost-bot/source/jobs/daily-stand-up.ts index 0caf51bcb..ef58618a6 100644 --- a/standup-mattermost-bot/source/jobs/daily-stand-up.ts +++ b/standup-mattermost-bot/source/jobs/daily-stand-up.ts @@ -28,6 +28,7 @@ const nextDayStandup = nextDayMember const now = new Date() .toLocaleTimeString('fr', { + timeZone: 'Europe/Paris', hour: '2-digit', minute: '2-digit', }) diff --git a/standup-mattermost-bot/source/jobs/weekly-randomizer.ts b/standup-mattermost-bot/source/jobs/weekly-randomizer.ts index 075821b25..842f2d670 100644 --- a/standup-mattermost-bot/source/jobs/weekly-randomizer.ts +++ b/standup-mattermost-bot/source/jobs/weekly-randomizer.ts @@ -55,6 +55,7 @@ const nextStandupOrder = botConfig.standupDays const now = new Date() .toLocaleTimeString('fr', { + timeZone: 'Europe/Paris', hour: '2-digit', minute: '2-digit', })