fittings-tz-offset-at

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Zone rules at an instant

某一时刻的时区规则

tz.offset-at
on
https://fittings.sh
. One endpoint, deterministic compute.
The UTC offset, abbreviation and DST state a zone was on at any moment from 1970, with the surrounding transitions, and resolution of ambiguous or nonexistent local times.
tz.offset-at
接口部署于
https://fittings.sh
,是一个具备确定性计算能力的独立端点。
该接口可查询自1970年以来任意时刻某个时区的UTC偏移量、时区缩写、夏令时(DST)状态,以及相关的时区转换信息,同时能解析模糊或不存在的本地时间。

The call

调用方式

GET https://fittings.sh/v1/tz/offset-at
FieldTypeRequiredNotes
timezone
stringyesIANA zone, e.g. America/New_York
instant
stringnoISO 8601 with an explicit Z or +HH:MM offset. Give this or localTime.
localTime
stringnoWall-clock time with no offset, e.g. 2026-11-01T01:30:00. Give this or instant.
Example input:
json
{
  "timezone": "America/New_York",
  "localTime": "2026-11-01T01:30:00"
}
GET https://fittings.sh/v1/tz/offset-at
字段类型是否必填说明
timezone
stringIANA时区,例如 America/New_York
instant
string带明确Z或+HH:MM偏移的ISO 8601格式时间。需提供该参数或localTime参数
localTime
string无偏移量的挂钟时间,例如 2026-11-01T01:30:00。需提供该参数或instant参数
示例输入:
json
{
  "timezone": "America/New_York",
  "localTime": "2026-11-01T01:30:00"
}

Cost and provenance

费用与来源

Price$0.004
Sourcenone (pure compute over the runtime IANA tzdata)
Licencenone-needed
价格$0.004
数据源无(基于运行时IANA tzdata的纯计算)
许可无需许可

Why call it rather than answer from memory

为何调用该接口而非自行计算

An agent scheduling or reconciling timestamps must know that 01:30 on a fall-back night happens twice and 02:30 on a spring-forward night never happens at all; fixed offset arithmetic silently books the wrong hour.
在安排日程或协调时间戳时,Agent必须知道:夏令时回退当晚的01:30会出现两次,而夏令时提前当晚的02:30根本不存在;固定偏移量计算会悄无声息地记录错误的小时数。

Calling it

调用指南

A skill is loaded on its own, so this document has to be enough by itself. It does not assume the general
fittings
skill is also loaded.
call.mjs
ships alongside this file; if it is missing (this document reached you without the rest of the skill), fetch it once with
curl -sO https://fittings.sh/skill/call.mjs
.
Free, and needs no wallet. Read the schema and see what a call would cost:
bash
curl -s https://fittings.sh/catalog/tz.offset-at | jq
Paying. The endpoint answers
402 Payment Required
with a signed quote, you sign an authorization, and a facilitator settles it — you never send a transaction and never pay gas. Before it spends anything, the client checks its own hash against the gateway and refuses rather than sign with logic the gateway has moved past:
bash
undefined
该技能为独立加载,因此本文档内容已足够完整,无需依赖通用的
fittings
技能。
call.mjs
文件与本文档配套提供;若缺失(本文档单独送达),可通过以下命令一次性获取:
curl -sO https://fittings.sh/skill/call.mjs
免费操作,无需钱包。查看接口Schema及调用费用:
bash
curl -s https://fittings.sh/catalog/tz.offset-at | jq
付费调用。端点会返回
402 Payment Required
状态码及签名报价,你需签署授权信息,由协调方完成结算——无需发送交易,也无需支付Gas费。在产生费用前,客户端会将自身哈希与网关校验,若网关逻辑已更新则拒绝签署:
bash
undefined

Dry run. Prints the quote and pays nothing, because no key is set.

模拟调用。仅打印报价,无需支付,未设置密钥。

node call.mjs tz.offset-at timezone=America/New_York localTime=2026-11-01T01:30:00
node call.mjs tz.offset-at timezone=America/New_York localTime=2026-11-01T01:30:00

For real: a wallet holding USDC on Base, and nothing else.

实际调用:需持有Base链上USDC的钱包,无需其他资产。

export FITTINGS_PRIVATE_KEY=0x... node call.mjs tz.offset-at timezone=America/New_York localTime=2026-11-01T01:30:00

Spending is never a side effect of curiosity: with no `FITTINGS_PRIVATE_KEY`
the client fetches the quote and stops. `FITTINGS_MAX_PRICE` caps what it will
pay without asking, and defaults to $0.05.

**Use a throwaway wallet holding a few dollars, not a main one.** The key sits
in plaintext wherever the agent runs, and the whole cost of entry is USDC on
Base — no account, no API key, and no ETH, because the payer signs off-chain and
the facilitator broadcasts and pays the gas.

Writing your own client instead of using this one? `@x402/core` and
`@x402/evm` on npm, and the `fittings` skill records the two things that cost
real debugging time: the challenge is in a response header rather than the body,
and it must be re-signed from the exact request being retried.

If this is not the right service, `https://fittings.sh/catalog/search?q=...`
searches all of them for free.
export FITTINGS_PRIVATE_KEY=0x... node call.mjs tz.offset-at timezone=America/New_York localTime=2026-11-01T01:30:00

仅在明确授权时才会产生费用:未设置`FITTINGS_PRIVATE_KEY`时,客户端仅获取报价即停止操作。`FITTINGS_MAX_PRICE`可设置最高支付限额,默认值为0.05美元。

**建议使用仅持有少量资金的临时钱包,而非主钱包**。密钥会以明文形式存储在Agent运行环境中,准入成本仅为Base链上的USDC——无需账户、API密钥或ETH,因为付款方进行链下签名,由协调方负责广播交易并支付Gas费。

若不想使用该客户端,可自行开发:npm上的`@x402/core`和`@x402/evm`包可供使用,`fittings`技能记录了两个耗时调试的关键点:挑战信息在响应头而非响应体中,且必须针对重试的精确请求重新签名。

若该服务不符合需求,可通过`https://fittings.sh/catalog/search?q=...`免费搜索所有可用服务。