Skip to main content
Glama

@arizeai/phoenix-mcp

Official
by Arize-ai
useTimeFormatters.ts1.11 kB
import { useMemo } from "react"; import { usePreferencesContext } from "@phoenix/contexts"; import { createFullTimeFormatter, createShortDateTimeFormatter, createShortTimeFormatter, createTimeRangeFormatter, } from "@phoenix/utils/timeFormatUtils"; import { getLocale, getTimeZone } from "@phoenix/utils/timeUtils"; /** * Hook that returns time formatters based on the user's timezone preference */ export function useTimeFormatters() { const displayTimezone = usePreferencesContext( (state) => state.displayTimezone ); return useMemo(() => { const timeZone = displayTimezone ?? getTimeZone(); return { fullTimeFormatter: createFullTimeFormatter({ locale: getLocale(), timeZone, }), shortTimeFormatter: createShortTimeFormatter({ locale: getLocale(), timeZone, }), shortDateTimeFormatter: createShortDateTimeFormatter({ locale: getLocale(), timeZone, }), timeRangeFormatter: createTimeRangeFormatter({ locale: getLocale(), timeZone, }), }; }, [displayTimezone]); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arize-ai/phoenix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server