Skip to content

Commit

Permalink
Revert "Testing time in current timezone"
Browse files Browse the repository at this point in the history
  • Loading branch information
spcbfr committed Mar 26, 2024
1 parent e30b8fb commit 653d9d6
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/pages/notes/index.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
import { db, Note } from "astro:db";
const notes = await db.select().from(Note).orderBy(desc(Note.published));
import timezone from "dayjs/plugin/timezone";
import BaseLayout from "../../layouts/BaseLayout.astro";
import Link from "../../components/Link.astro";
import { desc } from "astro:db";
import dayjs from "dayjs";
dayjs.extend(timezone);
---

<BaseLayout title="notes!" description="Yusuf's note hub">
Expand All @@ -30,15 +28,9 @@ dayjs.extend(timezone);
>
<time
class="text-sm"
datetime={dayjs
.unix(note.published)
.tz("Africa/Tunis")
.toISOString()}
datetime={dayjs.unix(note.published).toISOString()}
>
{dayjs
.unix(note.published)
.tz("Africa/Tunis")
.format("ddd, D MMM, YYYY, HH:mm")}
{dayjs.unix(note.published).format("ddd, D MMM, YYYY, HH:mm")}
</time>
</a>
</div>
Expand Down

0 comments on commit 653d9d6

Please sign in to comment.