Skip to content

Commit

Permalink
Remove seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfitzsimmons committed Oct 30, 2024
1 parent 33dc880 commit 2a13bb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/pages/api/databases/[name]/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default async function handler(
// Generate a new database name with timestamp

const now = new Date();
const timestamp = `${now.getFullYear()}_${String(now.getMonth() + 1).padStart(2, '0')}_${String(now.getDate()).padStart(2, '0')}_${String(now.getHours()).padStart(2, '0')}_${String(now.getMinutes()).padStart(2, '0')}_${String(now.getSeconds()).padStart(2, '0')}`;
const timestamp = `${now.getFullYear()}_${String(now.getMonth() + 1).padStart(2, '0')}_${String(now.getDate()).padStart(2, '0')}_${String(now.getHours()).padStart(2, '0')}_${String(now.getMinutes()).padStart(2, '0')}`;
const newDatabaseName = `${existingDatabaseName}_${timestamp}`;

// Create the new database
Expand Down

0 comments on commit 2a13bb3

Please sign in to comment.