Skip to content

Commit

Permalink
Fix time output for not UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston committed Nov 2, 2023
1 parent fe250ea commit d4d6201
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions shared/js/background/broken-site-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d4d6201

Please sign in to comment.