Info JSON epoch is time of download, not time of upload.

This commit is contained in:
Roland 2022-12-08 13:45:46 -07:00
parent ad405d30cd
commit 9ffe6ee3f6
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
7 changed files with 16 additions and 69 deletions

View file

@ -106,14 +106,14 @@ export function Duration({video}) {
}
}
export function uploadDate(d) {
export function epochToDateString(date) {
// Convert a date integer to a human-readable date format.
let upload_date = <></>;
if (d) {
upload_date = new Date(d * 1000);
upload_date = `${upload_date.getFullYear()}-${upload_date.getMonth() + 1}-${upload_date.getDate()}`;
let d = <></>;
if (date) {
d = new Date(date * 1000);
d = `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`;
}
return upload_date;
return d;
}
export function CardLink({to, newTab = false, ...props}) {