Skip to content

Commit

Permalink
Fix seconds/milliseconds mixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Deflaktor committed Jun 25, 2024
1 parent f0df24d commit ff05e0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/getboards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function getBoards(): MapDescriptorExtended[] {

// find out the board upload date and last updated date
if(import.meta.env.DEV) {
// it takes way too long in dev mode to calculate, so we just set it to 0
// it takes way too long in dev mode to calculate, so we just set it to a random date
board.lastUpdated = getRandomDate().getTime();
board.uploadDate = getRandomDate().getTime();
} else {
Expand All @@ -153,7 +153,7 @@ function getBoards(): MapDescriptorExtended[] {
const command = `git log --follow --format=%at -- ".${path}"`
const output = execSync(command, { encoding: 'utf-8' });
const dates = output.trim().split('\n');
board.uploadDate = +dates[dates.length - 1];
board.uploadDate = (+dates[dates.length - 1])*1000;
} catch (error) {
console.error('Error:', error);
}
Expand All @@ -163,7 +163,7 @@ function getBoards(): MapDescriptorExtended[] {
const command = `git log --max-count=1 --format=%at -- ".${path}" ${frbPaths.join(' ')}`
const output = execSync(command, { encoding: 'utf-8' });
const dates = output.trim().split('\n');
board.lastUpdated = +dates[0];
board.lastUpdated = (+dates[0])*1000;
} catch (error) {
console.error('Error:', error);
}
Expand Down

0 comments on commit ff05e0d

Please sign in to comment.