From d4d6201c2f7416b27aec17e3affdea0eacc6bccd Mon Sep 17 00:00:00 2001 From: Jonathan Kingston Date: Thu, 2 Nov 2023 09:50:04 +0000 Subject: [PATCH] Fix time output for not UTC --- shared/js/background/broken-site-report.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/shared/js/background/broken-site-report.js b/shared/js/background/broken-site-report.js index 1d5da71fdd..aea68f0e95 100644 --- a/shared/js/background/broken-site-report.js +++ b/shared/js/background/broken-site-report.js @@ -100,11 +100,8 @@ async function digestMessage (message) { async function computeLastSentDay (urlString) { const url = new URL(urlString) - const time = new Date() - // Round time to nearest day - time.setHours(0, 0, 0, 0) // Output time as a string in the format YYYY-MM-DD - const dayOutput = time.toISOString().split('T')[0] + const dayOutput = new Date().toISOString().split('T')[0] // Use a sha256 hash prefix of the hostname so that we don't store the full hostname const hash = await digestMessage(url.hostname)