From 4ad72e58d479418e09e1094c95e4ad28ea4bad4f Mon Sep 17 00:00:00 2001 From: David Kellner <52860029+kellnerd@users.noreply.github.com> Date: Sun, 17 Oct 2021 17:41:48 +0200 Subject: [PATCH] hdtracks: Use UTC to fix "one day off" timezone issue Input string is in UTC, so the numbers should also be extracted as UTC. --- hdtracks_importer.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hdtracks_importer.user.js b/hdtracks_importer.user.js index 65721b1..d2f19a3 100644 --- a/hdtracks_importer.user.js +++ b/hdtracks_importer.user.js @@ -45,9 +45,9 @@ function parseHDtracksRelease(data, releaseUrl) { artist_credit: data.artists.map(name => ({ artist_name: name })), barcode: data.upc, labels: [{ name: data.label }], - year: releaseDate.getFullYear(), - month: releaseDate.getMonth() + 1, - day: releaseDate.getDate(), + year: releaseDate.getUTCFullYear(), + month: releaseDate.getUTCMonth() + 1, + day: releaseDate.getUTCDate(), comment: data.quality.replace(' ยท ', '/'), annotation: [data.cLine, data.pLine].join('\n'), // `data.credits` is currently not included as its unclear for which tracks the individual credits apply