Hooks

useTimeZone

Host context hook from moonpeak.

View .mdEdit on GitHub
import { useTimeZone } from "moonpeak";

useTimeZone(): string

The user's IANA time zone as reported by the host, falling back to the browser's.

Example

const tz = useTimeZone(); // "Asia/Jakarta"

Works in

Every MCP Apps host: ChatGPT, Claude, VS Code, Goose and the moonpeak inspector.

See all hooks in Runtime APIs.