projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
532ea1f
)
Fix hours in peertube-import-videos
author
Florent F
<florent.fayolle69@gmail.com>
Mon, 4 Nov 2019 07:44:38 +0000
(08:44 +0100)
committer
Chocobozzz
<chocobozzz@cpy.re>
Mon, 4 Nov 2019 16:38:03 +0000
(17:38 +0100)
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
patch
|
blob
|
history
diff --git
a/server/tools/peertube-import-videos.ts
b/server/tools/peertube-import-videos.ts
index 3c41a6c0c097393d445c45c8d0d641a8dbf40d03..b3c3aee3e496a975bf8a4ad6c2e26df7022ebf73 100644
(file)
--- 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.`);
}