Browse the docs

convertTime

Shows a time from one time zone in another, as an ISO stamp with its offset.

Details #

convertTime(time, from, to) reads time as it is on the clocks of the from zone and writes it as it is in the to zone: 2026-10-25T04:00:00+09:00. time can be a clock time (3pm, 15:30, noon), a date and time (2026-03-08 12:00), a date, an ISO stamp that carries its own offset, or a unix time (then from is ignored). A clock time with no date means today in the from zone.

Zones are city names (New York, Tokyo), abbreviations (PST, UTC) or identifiers (Europe/Paris). Daylight saving is applied for that date. Unlike timeIn the starting zone can be any zone, and the result keeps its date and offset, so parseDate reads it back.

Parameters #

Takes 3 arguments. {{ convertTime(text, b, c) }}

Examples #

convertTime("2026-10-24 3pm", "New York", "Tokyo")
→ 2026-10-25T04:00:00+09:00
formatDate(parseDate(convertTime("9am", "London", "Los Angeles")), "time")
→ 3:00 AM

Gotchas #

  • A time that doesn't exist on a clock-change day (2:30am when clocks jump forward) is moved forward an hour.

  • An unknown zone fails with convertTime() doesn't know the from time zone.