# Chinese Double-Hour Calculator (时辰)

> Converts a clock time to the traditional Chinese double-hour (时辰 shichen): its earthly branch (子 … 亥), animal and index, and, when a date is given, the hour's ganzhi (干支) by the 五鼠遁 (five-rats) rule from the day stem, with the option to count the late 子 hour (23:00–23:59) with the next day.

- Calculator id: `chinese-hour` · Category: Chinese Calendar (`lunar`) · Tool name: `convert_to_chinese_hour`
- Canonical page: https://tttkmbb.com/lunar/chinese-hour · This document: https://tttkmbb.com/lunar/chinese-hour.md · JSON definition: https://tttkmbb.com/lunar/chinese-hour.json

## Purpose

Converts a clock time to the traditional Chinese double-hour (时辰 shichen): its earthly branch (子 … 亥), animal and index, and, when a date is given, the hour's ganzhi (干支) by the 五鼠遁 (five-rats) rule from the day stem, with the option to count the late 子 hour (23:00–23:59) with the next day.

**Use when:** You need the 时辰 of a birth time or event (e.g. for a Bazi hour pillar), or the table of the twelve double-hours.

**Do not use when:** You need the full four pillars (use bazi-four-pillars), or you need to convert the clock time between time zones first (use time-zone-converter).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `time` | string |  | required | 24-hour clock time HH:MM (local mean/standard time of the place; China Standard Time in China). |
| `date` | date |  | optional | Optional civil date (1900–2100) to obtain the hour ganzhi from the day stem. |
| `late_zi_next_day` | boolean |  | optional, default true | true (common Bazi convention): 23:00–23:59 uses the next day's stem; false: it keeps the current day's stem (早子/晚子 distinction). |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `hour_branch` | string |  | Earthly branch of the double-hour. |
| `pinyin` | string |  | Pinyin of the branch. |
| `hour_name` | string |  | Name and clock range, e.g. 未时 Wei hour, 13:00–14:59. |
| `hour_index` | integer |  | 1 (子, 23:00–00:59) to 12 (亥, 21:00–22:59). |
| `animal` | string |  | Zodiac animal of the branch. |
| `hour_ganzhi` | string |  | Stem and branch of the hour by the 五鼠遁 rule; only when date is given. |
| `day_ganzhi_used` | string |  | Day stem-branch whose stem generated the hour stem, with the date it belongs to; only when date is given. |
| `is_late_zi` | boolean |  | true for 23:00–23:59 (晚子时). |
| `table` | list |  | 12 rows: branch, pinyin, hours, animal (and ganzhi for the entered date when given). |

## Formula

`branch index = floor(((hour + 1) mod 24) / 2) (子 = 0 for 23:00–00:59); hour stem = ((day stem index mod 5) × 2 + branch index) mod 10 (五鼠遁: 甲己 days start 甲子, 乙庚 丙子, 丙辛 戊子, 丁壬 庚子, 戊癸 壬子)`

Double-hours are fixed clock intervals of the local standard time; some schools use true solar time instead (add the longitude correction and equation of time before entering the time). The day stem uses the civil date, shifted to the next day for 23:00–23:59 when late_zi_next_day is true. Traditional calendar/cultural reference calculation; not a prediction, medical, legal or financial advice.

## Data Sources

- Earthly Branches (Wikipedia) — https://en.wikipedia.org/wiki/Earthly_Branches (reference, retrieved 2026-09-24)
- Sexagenary cycle (Wikipedia) — https://en.wikipedia.org/wiki/Sexagenary_cycle (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/chinese-hour?time=…`
- `POST https://tttkmbb.com/api/v1/calculate/chinese-hour` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/chinese-hour · OpenAPI operationId `convert_to_chinese_hour` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "chinese-hour", "inputs": {…}}`

## Example

- 14:30 on 2026-09-24 (辛丑 day): inputs `{"time":"14:30","date":"2026-09-24","late_zi_next_day":true}` → `{"hour_branch":"未","pinyin":"Wei","hour_index":8,"animal":"Goat (羊)","hour_ganzhi":"乙未 (Yiwei)","is_late_zi":false}`
- 23:30 on 2026-09-24 (late 子, next day 壬寅): inputs `{"time":"23:30","date":"2026-09-24","late_zi_next_day":true}` → `{"hour_branch":"子","hour_index":1,"hour_ganzhi":"庚子 (Gengzi)","is_late_zi":true}`

```
GET https://tttkmbb.com/api/v1/calculate/chinese-hour?time=14%3A30&date=2026-09-24&late_zi_next_day=true
```

## Limitations

You need the full four pillars (use bazi-four-pillars), or you need to convert the clock time between time zones first (use time-zone-converter). Double-hours are fixed clock intervals of the local standard time; some schools use true solar time instead (add the longitude correction and equation of time before entering the time). The day stem uses the civil date, shifted to the next day for 23:00–23:59 when late_zi_next_day is true. Traditional calendar/cultural reference calculation; not a prediction, medical, legal or financial advice. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Why does 23:30 use the next day's stem?**

The 子 hour spans midnight (23:00–00:59). Most Bazi schools treat 23:00–23:59 as the first hour of the following day (晚子时 belongs to the next day pillar); set late_zi_next_day=false to keep the current day's stem instead.

**Should I use clock time or solar time?**

Traditional almanacs assume local solar time. In China the clock (UTC+8) is up to about an hour ahead of solar time in the west of the country; convert first if your school requires true solar time.

## Related

- [Lunar Calendar Converter (农历)](https://tttkmbb.com/lunar/lunar-calendar-converter.md) — Day ganzhi and lunar date for the same date.
- [Sexagenary Cycle Calculator (干支)](https://tttkmbb.com/lunar/sexagenary-cycle.md) — Meaning of the stem-branch names and the 60-cycle table.
- [Time Zone Converter](https://tttkmbb.com/time/time-zone-converter.md) — Convert a birth time recorded in another zone to China Standard Time first.
