Standard civil clock time is a political convention, whereas the Four Pillars of Destiny (生辰八字) is a heliocentric and geocentric solar-angle system. Using raw hospital clock time without astronomical calibration causes up to 38% of global charts to plot the wrong Hour or Day Pillar. Here is how our open deterministic engine solves this.
Earth rotates 360° every 24 hours—exactly 1° every 4 minutes. A child born in Chengdu (104.06°E) experiences solar noon 63.7 minutes after Beijing Standard Time (120.00°E). We calculate exact meridian deltas down to the second:
Δt_lon = (λ_birth - λ_tz_meridian) × 4.0 min
Because Earth's orbit is elliptical (eccentricity e ≈ 0.0167) and its axis is tilted 23.44° to the ecliptic, apparent solar noon drifts between -14m 15s (Feb 11) and +16m 25s (Nov 3). We apply the 6-term Fourier series from Jean Meeus's Astronomical Algorithms:
EoT = 229.18 × (0.000075 + 0.001868·cosΓ - 0.032077·sinΓ ...)
Daylight Saving Time artificially advances civil clocks by +60 minutes. Beyond North America and Europe, Mainland China enforced nationwide summer DST between 1986 and 1991, and Taiwan enforced intermittent DST during 1945–1961 and 1974–1975. We strip the +60m offset prior to solar calculation.
The Zi Shichen (子时) spans 23:00 to 01:00 across midnight. Classical schools differ on whether 23:00–23:59 advances the Day Pillar immediately or preserves the current Day Stem while using the next day's Zi Hour Stem (夜子时分柱). Our engine lets practitioners toggle both protocols cleanly.
In Ziping BaZi, the Year Pillar never changes on Lunar New Year (Spring Festival). It transitions at the exact minute the Sun reaches 315° apparent celestial longitude (Lichun 立春)—typically February 3, 4, or 5. Month Pillars likewise switch on the 12 Jie (节) solar terms.
Counting only surface characters distorts Five-Element balance. Each Earthly Branch houses 1 to 3 Hidden Stems (Ben Qi 本气 1.0, Zhong Qi 中气 0.7, Yu Qi 余气 0.5), with the Month Branch (Yue Ling 月令) weighted at 2.2× as the seasonal climate commander.
General-purpose LLMs frequently miscalculate 60-JiaZi day pillars, leap-month lunar conversions, and exact Lichun minute boundaries when relying purely on token prediction. BaziTools provides deterministic astronomical ephemeris calculations compatible with cantian-tymext / tyme4ts and exposes structured machine-readable index files at /llms.txt.
Includes lookup tables for 24 Solar Terms, 6-term Meeus Equation of Time coefficients, and Hidden Stem weight matrices.