Skip to content

Commit 3827bbb

Browse files
committed
fix: add 12 hours to post date display for noon UTC
1 parent 95dfdff commit 3827bbb

File tree

1 file changed

+4
-1
lines changed
  • web/src/app/(content)/(info)/blog/[id]

1 file changed

+4
-1
lines changed

web/src/app/(content)/(info)/blog/[id]/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ const BlogPost = ({ params }: BlogPageProps) => {
7070
by <span className='font-bold text-zinc-300'>{post.author}</span>
7171
</p>
7272
<p>
73-
{new Date(post.date).toLocaleDateString('en-UK', {
73+
{/* Add 12 hours to the date to display at noon UTC */}
74+
{new Date(
75+
post.date.getTime() + 12 * 60 * 60 * 1000,
76+
).toLocaleDateString('en-UK', {
7477
day: 'numeric',
7578
month: 'short',
7679
year: 'numeric',

0 commit comments

Comments
 (0)