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.
This commit is contained in:
parent
532ea1fe22
commit
71056d0008
1 changed files with 1 additions and 0 deletions
|
@ -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.`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue