A TypeScript Raycast extension migrated from time-format-alfred (Go).
Its goal is simple: enter common time text, parse it quickly into a timestamp, and output formatted results across multiple time zones.
- Multi-format time parsing (keeps the original Alfred strategy: state-machine routing + multi-pattern matching)
- Supports timestamp input in seconds / milliseconds / microseconds / nanoseconds
- Supports relative time:
now,1 minutes ago,2 hours ago,1 day ago - Supports common Chinese and English date formats
- Supports specifying the source time zone at the end of the input
- Output:
TimeStamp(milliseconds)- Multi-zone time string:
YYYY-MM-DDTHH:mm:ss ±HH:mm ZONE
now15488546181548854618000154885461800000015488546180000000002019-01-30 21:24:442019-01-30T21:24:44+08:002024/01/12 8:30 PM20060102150405200601022006-01-02 15:0412 Feb 2006, 19:17May 8, 2009 5:57:51 PM1 minutes ago
- If the input includes a time zone (such as
+08:00,UTC,GMT, or an IANA zone), it is parsed with that zone. - If a zone is appended after a comma (for example,
2019-01-30 21:24:44,gmt-7), that appended zone is used. - Otherwise, the extension uses
Default Input Zonefrom preferences. - After parsing succeeds, results are rendered using
Output Zonesplus your local time zone.
In the Convert Time command preferences:
Default Input Zone- Default source time zone for inputs without an explicit zone.
- Examples:
Local,UTC,GMT-7,Asia/Shanghai
Output Zones- Comma-separated list of output time zones.
- Example:
UTC,America/Los_Angeles,Asia/Shanghai
- Run
Convert Timein Raycast. - Enter any time text.
- Press
↵to open Actions, then copy the timestamp or a formatted value in a specific zone.
npm install
npm run dev- The current implementation prioritizes the most common formats from the Alfred version.
- If you need additional edge formats (for example, specific RFC variants), extend the matching branches in
src/lib/parser.ts.

