Most Chinese astrology calculators take a birth date, a birth time and a city. The first two are obvious. The city is the one that quietly decides whether the hour pillar is right, because clock time is not sun time.
The day is cut by the sun, not by the clock
BaZi divides the day into twelve two-hour blocks. 子 runs 23:00–01:00, 丑 01:00–03:00, and so on. Those boundaries come from the sun's position. A birth certificate records clock time, and clock time is a political agreement: China runs the entire country on UTC+8, so a birth in Chengdu and a birth in Shanghai are both written down as 14:00.
Chengdu sits at 104.07°E. UTC+8 is defined at 120°E. One degree of longitude is four minutes of solar time, so Chengdu's sun runs 63.7 minutes behind the official clock. Add the equation of time, the up-to-16-minute gap between mean and apparent solar time caused by the elliptical orbit and the axial tilt, and a 14:00 birth in Chengdu lands near 12:56 on the sundial.
That is not a rounding error. Hour pillars change on odd hours, so 12:56 and 13:04 are different pillars.
const MIN_PER_DEG = 4; function solarOffsetMinutes(longitude, tzOffsetHours) { const standardMeridian = 15 * tzOffsetHours; // 120 for UTC+8 return MIN_PER_DEG * (longitude - standardMeridian); } solarOffsetMinutes(104.07, 8); // -63.7 (Chengdu) solarOffsetMinutes(91.1, 8); // -115.6 (Lhasa) In Lhasa the correction is nearly two hours. A child recorded at 14:30 there is born at 12:34 solar time; the same certificate in Shanghai means 14:30 solar time. Same hour on paper, different pillar in the chart.
The trap: year and month pillars must not use it
The day and hour pillars are functions of the local sun. The year and month pillars are not, and applying the same correction to them is the mistake I see most often in DIY implementations.
Month boundaries are the 24 solar terms, and a solar term is an absolute instant. 立春 2027 falls at 2027-02-04 09:46 Beijing time, which is 01:46 UTC. It is that moment everywhere on Earth. Shift it by the longitude offset and you move the boundary by an hour in Chengdu and by almost two in Kashgar, which pushes births near the term into the wrong month pillar.
So a chart needs two time bases:
- Year and month pillars — convert the birth clock time to the standard meridian's instant, then compare against the solar term instant. Timezone conversion only.
- Day and hour pillars — convert the birth clock time to true solar time at the birth longitude: 4 minutes per degree plus the equation of time.
Getting this backwards stays invisible in most charts. It only shows up for births within about an hour of a pillar boundary, and that is exactly the case where someone tells you the chart is wrong.
What the hour pillar actually holds
The hour pillar is the branch that carries the day master's output and the most personal part of the chart: children, later life, the private register of how someone acts when nobody is watching. Two people with the same date and different recorded hours can look like different charts, and one of them may be a data error rather than a destiny.
That is the less romantic conclusion, and it is more useful: before reading anything, check whether the birth time you were given was ever converted from clock time to solar time.
The free BaZi calculator I built prints the solar time it used underneath the chart, so the conversion is auditable instead of buried. If you want to know what the four columns mean before you read them, this page walks through one column at a time.