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.

已驗證STDIO僅桌面位置與生活資料與分析

概覽

AI 產生的概覽

將記錄的出生時間與地點換算為真太陽時,用於八字排盤,並修正歷史日光節約時間、經度與均時差。

可以做什麼
依鐘錶時間、IANA 時區與經度計算修正後的真太陽時,並列出日光節約時間、經度與均時差三項修正明細,同時偵測日光節約時間跳換期間不存在的當地時間。查詢已修正時間所屬的時辰,以及距離時辰邊界的分鐘數。託管端點另提供經太陽時修正的四柱排盤,含藏干、納音與大運,僅回傳事實而不作解讀。
適用情境
適合在建立或執行八字/四柱流程時使用,尤其是出生記錄為鐘錶時間、而命盤取決於太陽實際位置的場合,例如出生於日光節約時間期間或遠離標準經線的地方。應在排盤之前呼叫,把修正後的時間交給排盤引擎。
執行需求
透過 npx 以本機 stdio 程序執行,需要 Node.js 18 或更新版本,因為歷史時區取自執行環境的 ICU 資料。未宣告任何驗證、環境變數或標頭。也可改用託管的可串流 HTTP 端點,無需安裝。
安裝前請注意
本機工具不傳送任何資料到其他地方,也不寫入檔案。遠端工具會把你提供的出生資訊——日期、鐘錶時間、IANA 時區、經度,以及用來決定大運方向的性別旗標——透過 HTTPS 傳送到提供方端點;README 表示不保存資料、沒有第三方接收,但會保留標準的邊緣請求日誌。邊界提示採用約定門檻,接近邊界的命盤應兩種時辰都排。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 True Solar Time,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

$ npx true-solar-time 1988-07-01 08:00 Asia/Shanghai 121.47
clock time    1988-07-01 08:00 (Asia/Shanghai, DST GMT+9)true solar    1988-07-01 07:02correction    -58 min  DST         -60  longitude   +6  eq. of time -4hour branch   辰 (2 min from 卯)⚠ within 8 min of a branch boundary — cast both candidates

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:

  1. 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.
  2. 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.
  3. 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:

json
{  "mcpServers": {    "true-solar-time": { "url": "https://auspiceoracle.com/mcp" }  }}

Local (stdio):

json
{  "mcpServers": {    "true-solar-time": {      "command": "npx",      "args": ["-y", "true-solar-time-mcp"]    }  }}

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

ts
import { toTrueSolarTime } from 'true-solar-time-mcp'
const r = toTrueSolarTime(1992, 6, 15, 7, 10, 'Asia/Shanghai', 87.6)// r.hour === 4, r.minute === 59, r.correctionMinutes === -130// r.hourBranch === '寅' — two branches away from what the clock says

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:

ToolWhere it runs
true_solar_time, hour_branchlocally, offline, from the code in this repo
cast_chart, personality_sketch, compose_sketchremotely, on https://auspiceoracle.com/mcp/bazi

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:

bash
claude mcp add --transport http bazi https://auspiceoracle.com/mcp/bazi

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 — to https://auspiceoracle.com/mcp/bazi over 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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分