fix: panelde saatler 3 saat geri gösteriliyordu (sunucu UTC, Türkiye UTC+3)

.toLocaleString("tr-TR") tarih formatını Türkçe yapıyor ama saat değerini
hâlâ sunucunun sistem saat dilimiyle (Coolify/Hetzner container'ı UTC)
hesaplıyordu. Tüm tarih gösterimleri artık ortak formatTr() helper'ı
üzerinden timeZone: "Europe/Istanbul" ile sabitleniyor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-02 15:27:46 +03:00
co-authored by Claude Sonnet 5
parent 3e01116729
commit ce9e01bbeb
6 changed files with 24 additions and 9 deletions
+5 -4
View File
@@ -2,6 +2,7 @@ import { notFound } from "next/navigation";
import Link from "next/link";
import { prisma } from "@streamclipper/db";
import { fetchChannelStatuses } from "../../../lib/apiDaemon";
import { formatTr } from "../../../lib/formatDate";
import {
deleteRawSegment,
deleteCandidateSegment,
@@ -113,7 +114,7 @@ export default async function ChannelDetailPage({ params }: { params: Promise<{
<CardContent className="flex flex-col gap-3">
<p className="font-mono-num text-xs text-muted-foreground">
Aktif: {channel.isActive ? "evet" : "hayır"} · Son kontrol:{" "}
{channel.lastCheckedAt ? new Date(channel.lastCheckedAt).toLocaleString("tr-TR") : "—"}
{channel.lastCheckedAt ? formatTr(channel.lastCheckedAt) : "—"}
</p>
<form
@@ -157,7 +158,7 @@ export default async function ChannelDetailPage({ params }: { params: Promise<{
son poll hatası
</Badge>
<span className="font-mono-num text-xs text-muted-foreground">
{new Date(status.lastPollError.at).toLocaleString("tr-TR")}
{formatTr(status.lastPollError.at)}
</span>
</div>
<pre className="font-mono-num whitespace-pre-wrap rounded-md border border-border bg-background/60 p-3 text-[0.7rem] text-muted-foreground">
@@ -199,8 +200,8 @@ export default async function ChannelDetailPage({ params }: { params: Promise<{
<Card key={session.id}>
<CardHeader className="flex-row items-center justify-between">
<span className="font-mono-num text-xs text-muted-foreground">
{new Date(session.startedAt).toLocaleString("tr-TR")}
{session.endedAt ? ` ${new Date(session.endedAt).toLocaleString("tr-TR")}` : " (devam ediyor)"}
{formatTr(session.startedAt)}
{session.endedAt ? ` ${formatTr(session.endedAt)}` : " (devam ediyor)"}
</span>
<Badge variant="muted">{session.totalSegments} segment</Badge>
</CardHeader>