Timestamp ↔ Beijing time: zones and historical DST
How to convert epochs to Beijing wall time and back, plus notes on China’s 1986–1991 daylight saving periods.
Epoch → datetime: pick seconds/ms, then format in the target zone (Beijing ≈ Asia/Shanghai, UTC+8 today).
Datetime → epoch: interpret the wall clock in a zone, then emit the UTC instant as a number.
China observed DST in 1986–1991; different tzdata versions may disagree for that window.
This site treats Shanghai as fixed +08:00 for modern conversions; verify historical logs separately if needed.