From 71056d000864f0bc059626627772ddb61055f211 Mon Sep 17 00:00:00 2001 From: Florent F Date: Mon, 4 Nov 2019 08:44:38 +0100 Subject: [PATCH] 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. --- server/tools/peertube-import-videos.ts | 1 + 1 file changed, 1 insertion(+) 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.`); } -- 2.25.1