Update webapp to accept scan time as timestamp not ISO 8601 datestring

This commit is contained in:
Julian Stirling 2025-06-29 23:17:17 +01:00
parent 7f0745d772
commit a6e48f8882

View file

@ -240,8 +240,6 @@ export default {
this.scans = scans;
}
scans.forEach(scan => {
scan.modified = Date.parse(scan.modified);
scan.created = Date.parse(scan.created);
scan.can_stitch = !scan.stitch_available && scan.number_of_images > 3;
});
scans.sort((a, b) => {
@ -255,7 +253,9 @@ export default {
}
},
formatDate(timestamp) {
let d = new Date(timestamp);
// Multiply by 1000 as JS uses ms not s
let d = new Date(timestamp*1000);
// Convert to a sting in a very javascript way!
let yyyy = d.getFullYear();
let mm = d.getMonth() + 1;
let dd = d.getDate();