diff --git a/app/(admin)/settings/admin-settings-client.tsx b/app/(admin)/settings/admin-settings-client.tsx
index 18d77ae..7321251 100644
--- a/app/(admin)/settings/admin-settings-client.tsx
+++ b/app/(admin)/settings/admin-settings-client.tsx
@@ -3,6 +3,7 @@
import { useState, useEffect } from "react";
import useSWR from "swr";
import { toast } from "sonner";
+import { formatBeijingTime } from "@/lib/utils";
import {
Card,
CardContent,
@@ -1446,7 +1447,7 @@ export function AdminSettingsClient() {
{img.userName || img.userEmail?.split("@")[0]}
- {new Date(img.createdAt).toLocaleDateString("zh-CN", { month: "numeric", day: "numeric" })}
+ {formatBeijingTime(img.createdAt, { month: "numeric", day: "numeric" })}
))}
diff --git a/app/(chat)/featured/page.tsx b/app/(chat)/featured/page.tsx
index a2b46aa..68e1fd1 100644
--- a/app/(chat)/featured/page.tsx
+++ b/app/(chat)/featured/page.tsx
@@ -7,6 +7,7 @@ import { Dialog, DialogContent } from "@/components/ui/dialog";
import { ArrowLeft, Download, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, Sparkles, User, Building2, Clock, Bot } from "lucide-react";
import { Input } from "@/components/ui/input";
import Image from "next/image";
+import { formatBeijingTime } from "@/lib/utils";
type FeaturedImage = {
id: string;
@@ -199,7 +200,7 @@ export default function FeaturedPage() {
- {new Date(img.createdAt).toLocaleDateString("zh-CN", {
+ {formatBeijingTime(img.createdAt, {
month: "short",
day: "numeric",
})}
diff --git a/app/(chat)/gallery/page.tsx b/app/(chat)/gallery/page.tsx
index 66b6e88..72b6323 100644
--- a/app/(chat)/gallery/page.tsx
+++ b/app/(chat)/gallery/page.tsx
@@ -8,6 +8,7 @@ import { ArrowLeft, Download, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsR
import { Input } from "@/components/ui/input";
import Image from "next/image";
import { toast } from "sonner";
+import { formatBeijingTime } from "@/lib/utils";
type GalleryImage = {
id: string;
@@ -341,7 +342,7 @@ export default function GalleryPage() {
{img.alt}
- {new Date(img.createdAt).toLocaleString("zh-CN", {
+ {formatBeijingTime(img.createdAt, {
month: "short",
day: "numeric",
hour: "2-digit",
@@ -494,7 +495,7 @@ export default function GalleryPage() {
{selectedImage.alt}
- {new Date(selectedImage.createdAt).toLocaleString("zh-CN")}
+ {formatBeijingTime(selectedImage.createdAt)}