
True Solar Time
io.github.Shann5由 GitHub 账号 Shann5 发布v1.0.1更新于 Oct 24, 2026
True solar time correction for BaZi charts: historical DST, longitude, equation of time.
概览
将记录的出生时间与地点换算为真太阳时,用于八字排盘,并修正历史夏令时、经度与均时差。
- 可以做什么
- 根据钟表时间、IANA 时区与经度计算修正后的真太阳时,并给出夏令时、经度与均时差三项修正明细,同时识别夏令时跳变期间不存在的本地时间。查询已修正时间所属的时辰,以及距离时辰边界的分钟数。托管端点还提供经太阳时修正的四柱排盘,含藏干、纳音与大运,仅返回事实而不作解读。
- 适用场景
- 适合在构建或运行八字/四柱流程时使用,尤其是出生记录为钟表时间、而命盘取决于太阳实际位置的场景,例如出生在夏令时期间或远离标准经线的地方。应在排盘之前调用,把修正后的时间交给排盘引擎。
- 运行要求
- 通过 npx 作为本地 stdio 进程运行,需要 Node.js 18 或更高版本,因为历史时区取自运行环境的 ICU 数据。未声明任何认证、环境变量或请求头。也可改用托管的可流式 HTTP 端点,无需安装。
安装
在 SourceWeft 中
- 打开 控制台中的 True Solar Time,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
true-solar-time-mcp
True solar time correction for BaZi / Four Pillars charts — the step most calculators skip.
An MCP server, CLI, and TypeScript library that converts a recorded birth time (wall clock + IANA time zone + longitude) into the sun's actual time at the birthplace. Deterministic: same input, same output, every time.
Why this exists
A BaZi chart is a function of the sun's position, but birth records are written in civil clock time. Between the two sit three corrections that nearly every chart tool — including the popular open-source LLM "skills" — silently skips:
- Historical DST. China observed daylight saving time from 1986 to 1991. Everyone born in those six summers has a birth certificate recording a clock moved forward one hour — enough to cross an entire hour branch, and at the right time of night, the day pillar too. The IANA/ICU time-zone database knows this; most calculators never ask it.
- Longitude. China spans four geographic time zones and runs on one clock. At 07:10 Beijing time in Ürümqi, local solar time is barely past 05:00 — two full branches away.
- Equation of time. True and mean solar time drift apart by up to ±16 minutes over the year (NOAA approximation here, error well under a minute). In early November it alone can move a chart across a branch boundary.
This library also reports two things most tools won't tell you:
- Whether your birth time ever existed. On a spring-forward night the local clock jumps from 01:59 to 03:00; a birth record saying 02:30 refers to no real instant. We detect the gap, report its width, and never silently guess.
- How close the corrected time sits to a branch boundary. Within a few minutes, the honest answer is "cast both candidates", not false precision.
What it deliberately does not do
It does not cast charts, pick favorable elements, or interpret anything. Casting is a solved problem with good open-source implementations; interpretation has no unique right answer and doesn't belong in a lookup library. One step, done carefully.
The full methodology — every constant, threshold, and convention, including the ones this library uses — is published at auspiceoracle.com/en/method. Three worked examples with full derivations: the birth-time test. Background essay: true solar time.
To try it on your own birth data without installing anything: free BaZi calculator (true solar time applied).
MCP server
Hosted endpoint (no install): https://auspiceoracle.com/mcp — stateless streamable HTTP, no auth. Works as a claude.ai custom connector or in any MCP client that speaks streamable HTTP:
Local (stdio):
Tools:
true_solar_time— full correction: corrected instant, DST/longitude/EoT breakdown (the three always sum exactly to the total), hour branch, boundary distance, nonexistent-time detection.hour_branch— branch membership and boundary distance for an already-corrected time.
The hosted endpoint additionally exposes cast_pillars — solar-corrected four pillars with hidden stems, Na Yin and luck cycles, computed by the production Auspice Oracle engine (closed source; same conventions as the published methodology). Facts only — no strength verdicts, no interpretation.
If you're building a BaZi skill or agent: call true_solar_time before casting, and pass the corrected time to your caster. An LLM cannot do this conversion in-context — the equation of time is a trigonometric series and the DST history lives in a database, not in model weights.
Library
Conventions, stated plainly
- Hour branches switch on odd hours (子 starts at 23:00), 120 minutes each.
- The boundary-risk flag uses an 8-minute threshold. That is a convention, not physics — tune it to your own tolerance; near-boundary charts should be cast both ways regardless.
- Historical time zones come from your runtime's ICU data (Node ≥ 18). We do not maintain our own tables.
- When the standard offset itself changed mid-year (Russia 2011), the DST/longitude split of the breakdown can attribute imperfectly; the total correction is always computed from the actual offset and is unaffected.
Desktop extension (Claude Desktop)
The MCPB bundle in the releases packages this server for one-click install, with the full charting flow added:
Casting the four pillars needs the production engine (solar-term instants, luck-cycle start dates, the late-Zi convention), which is not part of this package — so the bundle forwards those three calls over HTTPS and passes the result through unchanged. Build it yourself with npm run build:mcpb.
The same hosted endpoint works as a plain remote MCP server, no install required:
Privacy Policy
Full policy: https://auspiceoracle.com/en/privacy
- Local tools (
true_solar_time,hour_branch) send nothing anywhere. No network, no telemetry, no files written. - Remote tools (
cast_chart,personality_sketch,compose_sketch) send the birth details you provide — date, clock time, IANA time zone, longitude, and for casting the gender flag that sets luck-cycle direction — tohttps://auspiceoracle.com/mcp/baziover HTTPS, to compute that one response. - No name, no email, no account, no authentication is asked for or accepted by that endpoint.
- Nothing is persisted: the endpoint is stateless and does not store birth details or results, and does not use them for training. Standard edge request logs (IP, timestamp, path) are kept by the CDN for abuse prevention; request bodies are not logged.
- No third parties receive the data; the endpoint calls no external service.
- Retention: none for request content. Contact: https://github.com/Shann5/true-solar-time-mcp/issues or the contact route on auspiceoracle.com.
Relationship to auspiceoracle.com
This is an extracted mirror of the solar-time layer of the engine behind Auspice Oracle. The main engine is the source of truth; the golden tests here pin this mirror to the same published examples. Bug reports are very welcome; PRs that change the conventions above will be declined (a convention fork would make the published methodology untrue).
MIT © Shan Liu
来源:README.md,提交 8b01d29
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分