# Using the time connector Three MCP tools and one page, all backed by a timezone database compiled into the binary. This guide is written for a person setting it up, not for an agent. ## 1. Install it Through SCORPIOX BOT: **Settings -> Plugins -> Marketplace**, find **time** and pick a target. The prebuilt binary for your node's platform is verified against its published SHA-256 and run through a `--meta` smoke test before it is moved into place. By hand: ```sh cp plugin_time ~/.scorpiox/plugins/plugin_time chmod +x ~/.scorpiox/plugins/plugin_time ``` Windows puts it in `%LOCALAPPDATA%\scorpiox\plugins\plugin_time.exe`; a BotCloud container uses `/workspace/.scorpiox/plugins/plugin_time`. No restart is needed: the node discovers `plugin_*` on every request. ## 2. Check the zone name you want ```sh curl -s -H "X-Bot-Password: $BOT_PASSWORD" \ "http://127.0.0.1:8150/plugin_time?action=zones" | head -c 200 ``` Every key is an exact IANA name. `Europe/Warsaw` is a key; `europe/warsaw` is not, on any platform, on purpose - a connector that accepts both on macOS and only one on Linux makes the same call mean different things per node. ## 3. Ask for the time ```sh curl -s -H "X-Bot-Password: $BOT_PASSWORD" \ "http://127.0.0.1:8150/plugin_time?action=current&timezone=Pacific/Auckland" ``` ```json {"ok":true,"timezone":"Pacific/Auckland","datetime":"2026-11-14T13:00:00+13:00", "day_of_week":"Saturday","is_dst":true,"utc_offset":"+13:00","abbreviation":"NZDT"} ``` Omit `timezone` and you get the node's own zone. ## 4. Convert ```sh curl -s -H "X-Bot-Password: $BOT_PASSWORD" \ "http://127.0.0.1:8150/plugin_time?action=convert&source_timezone=Pacific/Auckland&time=09:00&target_timezone=America/New_York" ``` Two things surprise people, and both are deliberate: * **A time that does not exist is an error.** On the morning a zone springs forward, 02:30 never happens; the answer says so and names the date instead of quietly returning 03:30 or 01:30. * **A time that happens twice is reported twice.** On the night a zone falls back, 01:30 happens at +01:00 and again at +00:00. `source`/`target` are the first; `later_occurrence` is the second, with its own note. ## 5. Ask what the time was ```sh curl -s -H "X-Bot-Password: $BOT_PASSWORD" \ "http://127.0.0.1:8150/plugin_time?action=ago&timezone=Europe/London&hours_ago=5" ``` The span is subtracted from the UTC instant, so five hours across a clock change is five real hours - not five readings of the wall clock, which would be four or six. ## 6. From an agent `plugin_time` is a connector, reached through the single `sx-connector-mcp` router rather than its own MCP server slot: ```sh sx-connector-mcp --list # time should be listed sx-connector-mcp --tools time # the three schemas sx-connector-mcp --call time convert_time \ '{"source_timezone":"Pacific/Auckland","time":"09:00","target_timezone":"Asia/Tokyo"}' ``` ## 7. The page Open **Settings -> Plugins -> time -> Open**, or `/plugin_time` on the node directly. The clock, the converter and the world-clock table all call the tools every second, so what you see is what an agent gets. Add zones with the picker; the list is remembered in your browser. ## 8. Windows nodes A Windows box has no tzdata. Its own zone name comes from the registry and is mapped through CLDR to the same IANA key every other platform reports, so `get_current_time` with no arguments answers `Pacific/Auckland` there too - not "UTC+12" and not a guess. The whole map is embedded on every platform, so you can check a mapping without a Windows machine: ```sh plugin_time --win-tz "New Zealand Standard Time" # Pacific/Auckland plugin_time --win-tz "Eastern Standard Time" # America/New_York ``` ## 9. Updating the database ```sh make tzdata # regenerate src/tzdata.h from /usr/share/zoneinfo make test # the epochs in the suite are absolute, so a moved zone fails loudly ``` Only do that deliberately: a tzdata release can change historical transitions, and the suite pinning absolute instants is what turns such a change into a visible failure rather than a silently different answer.