From 6177f5211745a5ba846d1da5caaf07d8a2e96c67 Mon Sep 17 00:00:00 2001 From: sofvanh <23138848+sofvanh@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:57:20 +1300 Subject: [PATCH] Fix timestamp type --- backend/src/db/getTimestamp.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/db/getTimestamp.ts b/backend/src/db/getTimestamp.ts index 09c05d2..cbcbee7 100644 --- a/backend/src/db/getTimestamp.ts +++ b/backend/src/db/getTimestamp.ts @@ -1,4 +1,4 @@ -export function getTimestamp(id: string): Date { +export function getTimestamp(id: string): number { const parts = id.split('_'); if (parts.length !== 2) { throw new Error('Invalid ID format'); @@ -6,5 +6,5 @@ export function getTimestamp(id: string): Date { const timestampBase36 = parts[1].slice(0, -6); const timestamp = parseInt(timestampBase36, 36); - return new Date(timestamp); + return timestamp; }