From: Florent F Date: Mon, 4 Nov 2019 07:44:38 +0000 (+0100) Subject: Fix hours in peertube-import-videos X-Git-Tag: v2.0.0~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=71056d000864f0bc059626627772ddb61055f211;p=oweals%2Fpeertube.git Fix hours in peertube-import-videos Youtube doesn't store the hour of the publish date so set it to zero in order to compare it. --- diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index 3c41a6c0c..b3c3aee3e 100644 --- a/server/tools/peertube-import-videos.ts +++ b/server/tools/peertube-import-videos.ts @@ -373,6 +373,7 @@ function parseDate (dateAsStr: string): Date { exitError(`Invalid date passed: ${dateAsStr}. Expected format: YYYY-MM-DD. See help for usage.`); } const date = new Date(dateAsStr); + date.setHours(0, 0, 0); if (isNaN(date.getTime())) { exitError(`Invalid date passed: ${dateAsStr}. See help for usage.`); }