Skip to main content
Glama
Shann5

true-solar-time-mcp

by Shann5

true-solar-time-mcp

八字/四柱排盘的真太阳时校正——大多数排盘工具跳过的一步。

一个 MCP 服务器、CLI 和 TypeScript 库,将记录的出生时间(钟表时间 + IANA 时区 + 经度)转换为出生地太阳的实际时间。确定性:相同输入,相同输出,每次皆然。

$ 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:02
correction    -58 min
  DST         -60
  longitude   +6
  eq. of time -4
hour branch   辰 (2 min from 卯)
⚠ within 8 min of a branch boundary — cast both candidates

为什么存在

八字命盘是太阳位置的函数,但出生记录写的是民用钟表时间。两者之间隔着三项校正,几乎所有的排盘工具——包括流行的开源 LLM"技能"——都默默跳过了:

  1. 历史夏令时。 中国在 1986 年至 1991 年间实行过夏令时。在这六个夏天出生的人,出生证明上记录的时钟都被拨快了一小时——足以跨越整整一个时辰,若在夜间合适的时间,还能跨越日柱。IANA/ICU 时区数据库知道这一点;大多数排盘工具从不查询它。

  2. 经度。 中国横跨四个地理时区,却统一使用一个时钟。乌鲁木齐的北京时间 07:10,当地太阳时刚过 05:00——相差整整两个时辰。

  3. 均时差。 真太阳时与平太阳时在一年中最多相差 ±16 分钟(此处采用 NOAA 近似,误差远小于一分钟)。仅此一项,在十一月初就可能让命盘跨越时辰边界。

这个库还报告两件大多数工具不会告诉你的事:

  • 你的出生时间是否真实存在过。 在春季拨快的夜晚,当地时钟从 01:59 跳到 03:00;出生记录写 02:30 指的是一个不存在的时刻。我们检测这个间隙,报告其宽度,绝不默默猜测。

  • 校正后的时间距离时辰边界有多近。 在几分钟之内,诚实的答案是"两个候选都排",而不是虚假的精确。

Related MCP server: BaZi (Eight Characters) Calculator

它刻意做什么

它不排盘、不选喜用神、不解读任何内容。排盘是一个已有优秀开源实现的问题;解读没有唯一正确答案,不属于查询库的职责。一步,做扎实。

完整方法论——每一个常量、阈值和约定,包括本库使用的——发布在 auspiceoracle.com/en/method。三个带完整推导的实例:出生时间测试。背景文章:真太阳时

MCP 服务器

托管端点(无需安装): https://auspiceoracle.com/mcp —— 无状态流式 HTTP,无需认证。可作为 claude.ai 自定义连接器使用,也可在任何支持流式 HTTP 的 MCP 客户端中使用:

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

本地(stdio):

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

工具:

  • true_solar_time —— 完整校正:校正后的时刻、夏令时/经度/均时差分解(三者之和始终精确等于总量)、时辰、距边界距离、不存在时间检测。

  • hour_branch —— 对已校正的时间,返回时辰归属和距边界距离。

托管端点额外暴露 cast_pillars —— 太阳时校正后的四柱,含藏干、纳音和大运,由生产环境的 Auspice Oracle 引擎计算(闭源;与已发布方法论采用相同约定)。仅事实——无旺衰判断,无解读。

如果你在构建八字技能或智能体:在排盘之前调用 true_solar_time,将校正后的时间传给排盘器。LLM 无法在上下文中完成这一转换——均时差是三角级数,夏令时历史存在数据库中,而非模型权重里。

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

约定,直说

  • 时辰在奇数点切换(子时从 23:00 开始),每个时辰 120 分钟。

  • 边界风险标志使用 8 分钟阈值。这是约定,不是物理——可按你自己的容差调整;接近边界的命盘无论如何都应两种排法都排。

  • 历史时区来自运行时的 ICU 数据(Node ≥ 18)。我们不维护自己的表。

  • 当标准时差本身在年中发生变化时(如俄罗斯 2011 年),分解中的夏令时/经度拆分可能归因不完美;总校正始终根据实际时差计算,不受影响。

与 auspiceoracle.com 的关系

这是 Auspice Oracle 引擎中太阳时层的提取镜像。主引擎是权威来源;此处的黄金测试将这个镜像钉在相同的已发布实例上。非常欢迎缺陷报告;更改上述约定的 PR 将被拒绝(约定分叉会使已发布的方法论失真)。

MIT © Shan Liu

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables generation of detailed Chinese Ziwei Doushu (Purple Star) astrological charts with geographic location support and true solar time conversion. Provides tools for geocoding locations, converting Beijing time to apparent solar time, and creating comprehensive astrology readings based on birth information.
    10
    13
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Calculates Chinese BaZi (Four Pillars of Destiny) charts based on birth date, time, and location, including solar term information, decade luck cycles, and true solar time corrections.
    2
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to calculate deterministic Bazi (Four Pillars) charts with True Solar Time and Earthly Branch interactions, avoiding LLM hallucination of calendrical math.
    6
    182
    122
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Converts civil time to true solar time and audits whether civil and solar times cross Chinese 时辰 boundaries, for time-sensitive divination workflows.
    MIT

View all related MCP servers

Related MCP Connectors

  • Generate BaZi charts from birth details. Explore Four Pillars, solar terms, and Luck Pillars for d…

  • BaZi (Chinese Four Pillars) chart calculator. Structured chart data only, no predictions.

  • Sub-arcsecond ephemeris and astrology on NASA JPL DE440: natal, transits, eclipses, Human Design.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shann5/true-solar-time-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server