Skip to content

Commit 7cc4bac

Browse files
committed
refactor: modified time of article
1 parent 57528ae commit 7cc4bac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pages/wiki/[...slug].astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ export interface Props {
3030
}
3131
3232
const modifiedTime = remarkPluginFrontmatter.lastModified
33-
? dayjs(remarkPluginFrontmatter.lastModified).format("HH:mm:ss DD MMMM YYYY")
34-
: "???";
33+
? dayjs(remarkPluginFrontmatter.lastModified)
34+
.utc()
35+
.format("HH:mm:ss DD MMMM YYYY UTC")
36+
: "Not committed yet";
3537
---
3638

3739
<Layout article={article} headings={headings}>
@@ -49,6 +51,6 @@ const modifiedTime = remarkPluginFrontmatter.lastModified
4951
}}
5052
/>
5153
<div class="modified-timestamp">
52-
<p>Last Modified: {modifiedTime} UTC</p>
54+
<p>Last Modified: {modifiedTime}</p>
5355
</div>
5456
</Layout>

0 commit comments

Comments
 (0)