diff --git a/src/ui/flights/TimeGroup.tsx b/src/ui/flights/TimeGroup.tsx index 1c3631ce..57147470 100644 --- a/src/ui/flights/TimeGroup.tsx +++ b/src/ui/flights/TimeGroup.tsx @@ -1,5 +1,5 @@ import type { FC } from "react"; -import { formatTime } from "@/shared/utils/datetime/index.js"; +import { formatLocalTime } from "@/shared/utils/datetime/index.js"; import "./TimeGroup.scss"; export interface TimeGroupProps { @@ -25,8 +25,12 @@ export const TimeGroup: FC = ({ dayChange, label, }) => { - const scheduledTime = formatTime(scheduled); - const actualTime = actual ? formatTime(actual) : undefined; + // formatLocalTime reads the wall-clock from the offset-aware ISO + // string, so a flight arriving at 06:30 in Almaty (GMT+5) reads + // 06:30 regardless of the viewer's timezone. formatTime would + // reproject through new Date() and show '04:30' in Moscow. + const scheduledTime = formatLocalTime(scheduled); + const actualTime = actual ? formatLocalTime(actual) : undefined; const hasDelay = actualTime !== undefined && actualTime !== scheduledTime; return (