diff --git a/src/services/bookmarkHelpers.ts b/src/services/bookmarkHelpers.ts index a433c1dc..187ea46f 100644 --- a/src/services/bookmarkHelpers.ts +++ b/src/services/bookmarkHelpers.ts @@ -60,7 +60,7 @@ export const processApplesauceBookmarks = ( return allItems.map((bookmark: BookmarkData) => ({ id: bookmark.id || `${isPrivate ? 'private' : 'public'}-${Date.now()}`, content: bookmark.content || '', - created_at: bookmark.created_at || Date.now(), + created_at: bookmark.created_at || Math.floor(Date.now() / 1000), pubkey: activeAccount.pubkey, kind: bookmark.kind || 30001, tags: bookmark.tags || [], @@ -74,7 +74,7 @@ export const processApplesauceBookmarks = ( return bookmarkArray.map((bookmark: BookmarkData) => ({ id: bookmark.id || `${isPrivate ? 'private' : 'public'}-${Date.now()}`, content: bookmark.content || '', - created_at: bookmark.created_at || Date.now(), + created_at: bookmark.created_at || Math.floor(Date.now() / 1000), pubkey: activeAccount.pubkey, kind: bookmark.kind || 30001, tags: bookmark.tags || [], diff --git a/src/services/bookmarkService.ts b/src/services/bookmarkService.ts index 7492a53a..b6a09f87 100644 --- a/src/services/bookmarkService.ts +++ b/src/services/bookmarkService.ts @@ -120,7 +120,7 @@ export const fetchBookmarks = async ( title: `Bookmarks (${sortedBookmarks.length})`, url: '', content: latestContent, - created_at: newestCreatedAt || Date.now(), + created_at: newestCreatedAt || Math.floor(Date.now() / 1000), tags: allTags, bookmarkCount: sortedBookmarks.length, eventReferences: allTags.filter((tag: string[]) => tag[0] === 'e').map((tag: string[]) => tag[1]),