Skip to content

Commit

Permalink
fix(bookmarks): not consider timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
noghartt committed Nov 2, 2024
1 parent d7cdc47 commit eac7a71
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/bookmarks/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import bookmarksJson from './_bookmarks.json';
const bookmarksData = bookmarksJson.data;
dayjs.extend(dayjsTimezone);
const groupByMonth = (bookmarks) => {
const grouped = bookmarks.reduce((acc, bookmark) => {
const month = dayjs.tz(bookmark.savedAt, 'America/Sao_Paulo').startOf('month').toISOString();
const month = dayjs(bookmark.savedAt).startOf('month').toISOString();
if (!acc[month]) {
acc[month] = [];
}
Expand Down

0 comments on commit eac7a71

Please sign in to comment.