From e40bf61b044e6f269428334271c1e160bbc47604 Mon Sep 17 00:00:00 2001
From: OpenClaw Bot
Date: Thu, 26 Feb 2026 16:55:09 -0600
Subject: [PATCH] Fix timezone date display bug - ensure correct date shown
across timezones
---
src/app/page.tsx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/app/page.tsx b/src/app/page.tsx
index b9aa5f7..bc4f25f 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -9,6 +9,12 @@ import Head from "next/head";
import Link from "next/link";
import { AudioPlayer } from "@/components/AudioPlayer";
+// Helper to parse date string (YYYY-MM-DD) correctly across timezones
+// Appends noon UTC to ensure consistent date display regardless of local timezone
+function parseDate(dateStr: string): Date {
+ return new Date(`${dateStr}T12:00:00Z`);
+}
+
interface Message {
id: string;
date: string;
@@ -219,7 +225,7 @@ function BlogPageContent() {
{getTitle(selectedPost.content)}
- {format(new Date(selectedPost.date), "MMMM d, yyyy")}
+ {format(parseDate(selectedPost.date), "MMMM d, yyyy")}
@@ -307,7 +313,7 @@ function BlogPageContent() {
{getExcerpt(featuredPost.content, 200)}
- {format(new Date(featuredPost.date), "MMMM d, yyyy")}
+ {format(parseDate(featuredPost.date), "MMMM d, yyyy")}
·
5 min read
@@ -327,10 +333,10 @@ function BlogPageContent() {
{/* Date Column */}
- {format(new Date(post.date), "d")}
+ {format(parseDate(post.date), "d")}
- {format(new Date(post.date), "MMM")}
+ {format(parseDate(post.date), "MMM")}
@@ -361,7 +367,7 @@ function BlogPageContent() {
- {format(new Date(post.date), "MMMM d, yyyy")}
+ {format(parseDate(post.date), "MMMM d, yyyy")}
·
3 min read