<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yi Xu</title>
    <description>The latest articles on DEV Community by Yi Xu (@xuyi676).</description>
    <link>https://dev.to/xuyi676</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4262530%2F125f5ebd-68b4-4ae3-9a39-4e0e08f8ef87.png</url>
      <title>DEV Community: Yi Xu</title>
      <link>https://dev.to/xuyi676</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xuyi676"/>
    <language>en</language>
    <item>
      <title>Why the Position of the Zi Wei Star Drives the Whole Chart</title>
      <dc:creator>Yi Xu</dc:creator>
      <pubDate>Thu, 26 Nov 2026 12:49:14 +0000</pubDate>
      <link>https://dev.to/xuyi676/why-the-position-of-the-zi-wei-star-drives-the-whole-chart-365</link>
      <guid>https://dev.to/xuyi676/why-the-position-of-the-zi-wei-star-drives-the-whole-chart-365</guid>
      <description>&lt;p&gt;Most stars in a Zi Wei chart are placed by simple rules: this star sits one palace from that one, this one is set by the birth year branch. &lt;strong&gt;紫微 (Zi Wei)&lt;/strong&gt; is different. Its position is computed, and every other major star follows from it. That is why one arithmetic step decides the entire architecture of a chart.&lt;/p&gt;

&lt;h2&gt;
  
  
  One Star Is Placed by Arithmetic
&lt;/h2&gt;

&lt;p&gt;Zi Wei's position is computed from two numbers: the &lt;strong&gt;五行局 (Five Element Bureau)&lt;/strong&gt; of the Life Palace and the lunar day of the month. The procedure takes the smallest multiple of the bureau number that is at least the lunar day. The quotient says how many palaces to count from a starting point that depends on the bureau, and the difference between that multiple and the day says how far to step back.&lt;/p&gt;

&lt;p&gt;Different schools describe the starting points with different mnemonics, and some use a borrowing adjustment when the remainder is large. The output is the same: one palace for Zi Wei. It is the only major star whose placement is a division problem rather than a rule of thumb.&lt;/p&gt;

&lt;h2&gt;
  
  
  Everything Else Follows
&lt;/h2&gt;

&lt;p&gt;The other thirteen major stars are placed relative to Zi Wei by fixed offsets. In one direction: 天机 one palace away, 太阳 three, 武曲 four, 天同 five, 廉贞 eight. The 天府 series is set by a mirror rule — 天府 sits in the palace that mirrors Zi Wei across the 寅-申 axis — and then 太阴, 贪狼, 巨门, 天相, 天梁, 七杀 and 破军 follow in sequence.&lt;/p&gt;

&lt;p&gt;So the entire fourteen-star layout is a function of one palace. This is why practitioners say the chart is decided by the bureau and the day: everything after that is bookkeeping.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Offset From Zi Wei&lt;/th&gt;
&lt;th&gt;Star&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Same palace&lt;/td&gt;
&lt;td&gt;紫微 Zi Wei&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One palace&lt;/td&gt;
&lt;td&gt;天机 Tian Ji&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Three palaces&lt;/td&gt;
&lt;td&gt;太阳 Tai Yang&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Four palaces&lt;/td&gt;
&lt;td&gt;武曲 Wu Qu&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Five palaces&lt;/td&gt;
&lt;td&gt;天同 Tian Tong&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Eight palaces&lt;/td&gt;
&lt;td&gt;廉贞 Lian Zhen&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What Zi Wei Means in a Chart
&lt;/h2&gt;

&lt;p&gt;Zi Wei is the emperor star. It reads as authority, standards, dignity, and the need to be in command of one's own frame. Where it sits is where you seek control and where you expect recognition. In the Life Palace it produces self-direction and a certain formality; in the Career palace, work becomes the seat of authority; in the Spouse palace, the partner is invested with authority or the relationship becomes a status project.&lt;/p&gt;

&lt;p&gt;It is also the star most likely to be misread as literal rank. Zi Wei does not mean you will be a chief executive. It means the demand for autonomy and standards sits in a particular department of your life, and that department is where the chart's central drama plays out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Throne Room Table
&lt;/h2&gt;

&lt;p&gt;Reading Zi Wei by palace is one of the fastest ways to orient a new chart. The star tells you which department of life carries the authority question.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Zi Wei Sits In&lt;/th&gt;
&lt;th&gt;Where Authority Is Sought&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;命宫 Life&lt;/td&gt;
&lt;td&gt;Over oneself: self-definition and personal standards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;兄弟 Siblings&lt;/td&gt;
&lt;td&gt;Over peers: the role of elder or arbiter among equals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;夫妻 Spouse&lt;/td&gt;
&lt;td&gt;Over partnership: the partner as authority or as status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;子女 Children&lt;/td&gt;
&lt;td&gt;Over the next generation: teaching, mentoring, legacy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;财帛 Wealth&lt;/td&gt;
&lt;td&gt;Over money: financial control and standards of worth&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;疾厄 Health&lt;/td&gt;
&lt;td&gt;Over the body: appetite, rest, health regimes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;迁移 Travel&lt;/td&gt;
&lt;td&gt;Over the outside world: public standing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;交友 Friends&lt;/td&gt;
&lt;td&gt;Over networks: leadership among colleagues&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;官禄 Career&lt;/td&gt;
&lt;td&gt;Over work: vocation as the seat of authority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;田宅 Property&lt;/td&gt;
&lt;td&gt;Over the household: home as castle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;福德 Fortune&lt;/td&gt;
&lt;td&gt;Over the inner life: standards of meaning and pleasure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;父母 Parents&lt;/td&gt;
&lt;td&gt;Over lineage and authority: the parent relationship&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Brightness, Transformations and a Sanity Check
&lt;/h2&gt;

&lt;p&gt;Brightness matters. Most classical tables rate Zi Wei strongest in 午 and weaker in positions where the emperor star has no platform; a fallen Zi Wei reads as authority without a throne, high standards with nowhere to apply them. 紫微 receives transformations in only two years: 乙 year gives it 化科, 壬 year gives it 化权. A 化权 Zi Wei is an amplified emperor star, more drive for control and more visible competence; a 化科 Zi Wei is refinement and reputation around the same authority.&lt;/p&gt;

&lt;p&gt;Because Zi Wei is placed by the lunar day, charts a day apart can differ substantially, which is why correct date conversion matters and why the leap-month question is not academic. It also gives a free check: if Zi Wei's position in a chart does not match the arithmetic you can do by hand from the bureau and the lunar day, something upstream is wrong — a wrong Life Palace, a wrong bureau, or a wrong date conversion. Fix that before reading anything else.&lt;/p&gt;




&lt;p&gt;I built a Zi Wei Dou Shu chart engine that runs entirely in the browser — no signup, no server, birth data never leaves the device. If you want to see the result: &lt;a href="https://mingpan-1xu.pages.dev" rel="noopener noreferrer"&gt;mingpan-1xu.pages.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>learning</category>
      <category>science</category>
    </item>
    <item>
      <title>How Accurate Is Zi Wei Dou Shu? An Honest Answer</title>
      <dc:creator>Yi Xu</dc:creator>
      <pubDate>Thu, 26 Nov 2026 12:48:28 +0000</pubDate>
      <link>https://dev.to/xuyi676/how-accurate-is-zi-wei-dou-shu-an-honest-answer-1ooj</link>
      <guid>https://dev.to/xuyi676/how-accurate-is-zi-wei-dou-shu-an-honest-answer-1ooj</guid>
      <description>&lt;p&gt;People ask whether Zi Wei Dou Shu is accurate as though the answer were a number. It is not. The honest answer depends on what kind of claim you think the system is making, and most of the confusion comes from mixing two very different claims together.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Kind of Claim the System Makes
&lt;/h2&gt;

&lt;p&gt;Zi Wei Dou Shu is a symbolic system, not a measuring instrument. It produces descriptions and tendencies, not quantities. That matters for the accuracy question, because a system that says you have a tendency toward caution cannot be wrong in the way a weather forecast can be wrong.&lt;/p&gt;

&lt;p&gt;Practitioners often talk as though the system predicts events. The honest position is narrower: the chart gives a vocabulary for describing conditions and timing, and any specific prediction is an inference layered on top by a human reader.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Would Count as Evidence
&lt;/h2&gt;

&lt;p&gt;For a claim to be testable it needs to be falsifiable: stated in advance, specific enough to fail, and compared against a base rate. A reading that says you will face a career decision this year is not testable, because almost everyone faces one. A reading that says a named event will happen in a named month to a named person is testable, and that is exactly the kind that tends not to survive controlled checks.&lt;/p&gt;

&lt;p&gt;There is no established body of peer-reviewed, controlled research showing that Zi Wei charts predict life events beyond chance. Claims of accuracy usually rest on retrospective fit: the reader knows the life and finds the chart explains it. That tests the reader's fluency, not the chart's predictive power.&lt;/p&gt;

&lt;p&gt;One confusion worth separating: the calculation is deterministic, the interpretation is not. Given a birth date, hour and calendar convention, the chart itself is arithmetic, and two honest practitioners should reach the same palaces and stars. What follows about meaning is where the human enters, and that is where the accuracy question actually lives. Debating whether the chart is correct conflates a reproducible computation with an unreproducible reading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why It Feels So Accurate
&lt;/h2&gt;

&lt;p&gt;Four effects do most of the work. The Barnum effect: broad statements feel personally true. Confirmation bias: hits are remembered, misses are forgotten. Interpretive flexibility: twelve palaces, dozens of stars and four transformations create an enormous surface, so almost any life can be described. And retrospective coherence: after the fact, a good story is easy to build.&lt;/p&gt;

&lt;p&gt;None of this means readers are dishonest. It means the feeling of accuracy is not evidence of accuracy, and a good practitioner should be the first to say so.&lt;/p&gt;

&lt;p&gt;Length is part of the problem. A written reading runs to thousands of words across twelve domains, so the chance that something lands is high even if the method has no predictive power at all. The right comparison is not one hit against nothing; it is the number of hits against the number of claims. Most readings never make that comparison, which is why the feeling of accuracy survives unchallenged.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the System Is Genuinely Good For
&lt;/h2&gt;

&lt;p&gt;Strip away the prediction claims and something useful remains: a disciplined vocabulary for talking about temperament, tradeoffs and timing. That is worth having, and it is testable in a different way, by whether it produces insight the person can act on.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A structured language for temperament and its tradeoffs&lt;/li&gt;
&lt;li&gt;A calendar of prompts: decade and annual changes as review points rather than predictions&lt;/li&gt;
&lt;li&gt;A way to surface what someone is avoiding, because the chart names it without blaming them&lt;/li&gt;
&lt;li&gt;A lens on a tradition that shaped how millions of people described themselves&lt;/li&gt;
&lt;li&gt;A reflective practice that rewards honesty and punishes over-claiming&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Test It on Yourself
&lt;/h2&gt;

&lt;p&gt;Write down, before the year begins, three specific predictions the chart seems to make, with deadlines. At the end of the year, score them. Do the same across a decade boundary. Keep the misses; they are the only data that will change your mind.&lt;/p&gt;

&lt;p&gt;Blind yourself when you can. Have someone read a chart without knowing whose it is and ask which description fits. If the answer is that it fits everyone, you have learned about the method's resolution rather than about the person.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Honest Answer
&lt;/h2&gt;

&lt;p&gt;As a predictive instrument, Zi Wei Dou Shu is unproven and probably untestable at the resolution people want from it. As an interpretive framework it is as good as the reader's discipline: it can generate real insight, and it can generate confident nonsense, and the difference is mostly honesty. Use it as a language for reflection, not as a claim on the future.&lt;/p&gt;




&lt;p&gt;I built a Zi Wei Dou Shu chart engine that runs entirely in the browser — no signup, no server, birth data never leaves the device. If you want to see the result: &lt;a href="https://mingpan-1xu.pages.dev" rel="noopener noreferrer"&gt;mingpan-1xu.pages.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>learning</category>
      <category>psychology</category>
    </item>
    <item>
      <title>The Five Element Bureau: Zi Wei Dou Shu's Hidden Clock</title>
      <dc:creator>Yi Xu</dc:creator>
      <pubDate>Thu, 26 Nov 2026 12:42:28 +0000</pubDate>
      <link>https://dev.to/xuyi676/the-five-element-bureau-zi-wei-dou-shus-hidden-clock-3a5e</link>
      <guid>https://dev.to/xuyi676/the-five-element-bureau-zi-wei-dou-shus-hidden-clock-3a5e</guid>
      <description>&lt;p&gt;The &lt;strong&gt;五行局 (Five Element Bureau)&lt;/strong&gt; is one of the least glamorous parts of Zi Wei Dou Shu and one of the most consequential. It is a single value derived from the Life Palace, and it governs both the timing of the whole chart and the placement of the Zi Wei star. Skip it and every decade boundary you read will be wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Chart's Hidden Clock
&lt;/h2&gt;

&lt;p&gt;The bureau is one of five values: 水二局, 木三局, 金四局, 土五局 or 火六局. Each pairs an element with a number, and that number is the chart's pulse rate. It decides the age at which the first ten-year cycle begins, and it serves as the divisor in the arithmetic that positions the Zi Wei star.&lt;/p&gt;

&lt;p&gt;If you have ever wondered why two people with nearly identical charts have decade cycles starting several years apart, the bureau is the answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Bureau Is Derived
&lt;/h2&gt;

&lt;p&gt;The Life Palace has a heavenly stem. That stem is assigned by the &lt;strong&gt;五虎遁&lt;/strong&gt; rule, which maps the birth year stem onto the first month: 甲 and 己 years begin at 丙寅, 乙 and 庚 at 戊寅, 丙 and 辛 at 庚寅, 丁 and 壬 at 壬寅, 戊 and 癸 at 甲寅. Count from there to the Life Palace's branch and you have its full stem-branch pair.&lt;/p&gt;

&lt;p&gt;That pair belongs to one of the sixty 甲子 combinations, each of which carries a 纳音 (received sound) element. The element maps to the bureau, and the bureau number is the element's traditional ordinal: water two, wood three, metal four, earth five, fire six. 甲子 and 乙丑 are 海中金, metal, so they give 金四局. 丙子 and 丁丑 are 涧下水, water, so they give 水二局.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Bureau&lt;/th&gt;
&lt;th&gt;Element&lt;/th&gt;
&lt;th&gt;First Cycle Begins&lt;/th&gt;
&lt;th&gt;Traditional Temperament&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;水二局&lt;/td&gt;
&lt;td&gt;Water&lt;/td&gt;
&lt;td&gt;age 2&lt;/td&gt;
&lt;td&gt;Adaptive, fluid, persuasive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;木三局&lt;/td&gt;
&lt;td&gt;Wood&lt;/td&gt;
&lt;td&gt;age 3&lt;/td&gt;
&lt;td&gt;Growing, restless, principled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;金四局&lt;/td&gt;
&lt;td&gt;Metal&lt;/td&gt;
&lt;td&gt;age 4&lt;/td&gt;
&lt;td&gt;Decisive, exacting, durable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;土五局&lt;/td&gt;
&lt;td&gt;Earth&lt;/td&gt;
&lt;td&gt;age 5&lt;/td&gt;
&lt;td&gt;Steady, accumulative, conservative&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;火六局&lt;/td&gt;
&lt;td&gt;Fire&lt;/td&gt;
&lt;td&gt;age 6&lt;/td&gt;
&lt;td&gt;Fast, expressive, impatient&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The Number Is the Clock
&lt;/h2&gt;

&lt;p&gt;The bureau number sets the starting age of the first &lt;strong&gt;大限 (ten-year cycle)&lt;/strong&gt; in 虚岁, the traditional counted age. A water-two chart begins its first decade at two; a fire-six chart at six. Each subsequent decade advances ten years, and the direction of travel depends on the year's polarity and the person's gender.&lt;/p&gt;

&lt;p&gt;This is why the bureau matters more than it looks. Two charts with the same stars can activate the Career palace at twenty-two or at twenty-six. When you are timing a decision, the bureau decides which decade you are actually standing in.&lt;/p&gt;

&lt;p&gt;One practical trap: the starting age is in 虚岁, the counted age, which at birth is one rather than zero. A water-two chart therefore begins its first decade in the calendar year the child turns one, not two, and a fire-six chart in the year they turn five. Practitioners who quote a bureau age beside a Western age without flagging the difference create timing errors that then get blamed on the chart. When you compare a reading against real events, convert the ages first.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Number Also Places Zi Wei
&lt;/h2&gt;

&lt;p&gt;The bureau is the divisor in the arithmetic that positions &lt;strong&gt;紫微 (Zi Wei)&lt;/strong&gt;. The lunar day of the month is divided by the bureau number; the quotient locates the star on a palace counted from a bureau-specific starting point, and the remainder adjusts the position back by one palace per unit. Every other major star is then placed relative to Zi Wei. The dependency runs: bureau first, Zi Wei second, everything else third.&lt;/p&gt;

&lt;p&gt;One precise consequence is worth remembering: the bureau does not depend on the day of the month at all. It comes from the year stem, month and hour through the Life Palace. So a one-day calendar error will move Zi Wei and every major star, but it will not move the clock. A wrong hour, by contrast, breaks both.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Bureau Says About Temperament
&lt;/h2&gt;

&lt;p&gt;Traditional practice attaches a flavour to each element, and it is a reasonable first hypothesis: water charts read as adaptable and socially fluid, wood as growth-oriented and idealistic, metal as principled and unbending, earth as patient and accumulative, fire as quick and expressive. Treat these as priors, not fixed traits.&lt;/p&gt;

&lt;p&gt;More useful than the temperament is the pacing. Earth-five and fire-six charts start their decades late and often read as slow starters; water-two charts start early and can look precocious. Neither is better. They are different clocks, and a reading that ignores the clock will be confidently wrong about timing.&lt;/p&gt;




&lt;p&gt;I built a Zi Wei Dou Shu chart engine that runs entirely in the browser — no signup, no server, birth data never leaves the device. If you want to see the result: &lt;a href="https://mingpan-1xu.pages.dev" rel="noopener noreferrer"&gt;mingpan-1xu.pages.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>books</category>
      <category>culture</category>
      <category>science</category>
    </item>
    <item>
      <title>Birth Data and Privacy: Why Local Zi Wei Computation Matters</title>
      <dc:creator>Yi Xu</dc:creator>
      <pubDate>Thu, 26 Nov 2026 12:38:26 +0000</pubDate>
      <link>https://dev.to/xuyi676/birth-data-and-privacy-why-local-zi-wei-computation-matters-4im5</link>
      <guid>https://dev.to/xuyi676/birth-data-and-privacy-why-local-zi-wei-computation-matters-4im5</guid>
      <description>&lt;p&gt;A Zi Wei chart needs your exact birth date, your birth time to the hour, your birthplace, and your gender. That combination is unusually identifying, and &lt;strong&gt;most free calculators ask for it without saying what happens next&lt;/strong&gt;. Thinking about that before you type is worth five minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why birth data is sensitive
&lt;/h2&gt;

&lt;p&gt;A full birth date, time, and place is one of the classic identity-verification tuples. It appears in credit applications, medical records, and account recovery flows. It is not a password, but it is not nothing either, and the exact-hour plus exact-place combination is much more specific than a birthday alone.&lt;/p&gt;

&lt;p&gt;Astrology sites are not typically high-security operations. Many are small projects with default logging, third-party analytics, and no published retention policy. The data may be stored longer than you expect, and it may be combined with other inputs you did not think about, such as the questions you asked alongside it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the data goes
&lt;/h2&gt;

&lt;p&gt;A server-side calculator sends your inputs to a backend, computes the chart, and returns the result. The backend may log requests, and analytics scripts may capture form fields. Third-party fonts, scripts, and advertising add more parties to the chain, and each one is a place where the data can be retained.&lt;/p&gt;

&lt;p&gt;A client-side calculator does the computation in your browser. Your data does not need to leave the device, and the page can work offline. That is a materially different privacy posture, not just a performance detail, and you can verify it yourself rather than trusting a policy page.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server-side means inputs leave your device&lt;/li&gt;
&lt;li&gt;Client-side means computation happens locally&lt;/li&gt;
&lt;li&gt;Analytics can capture form submissions&lt;/li&gt;
&lt;li&gt;Saved accounts usually mean stored data&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What to look for
&lt;/h2&gt;

&lt;p&gt;A privacy-respecting tool states where computation happens, avoids unnecessary accounts, does not require an email to see a chart, and works offline or with the network disabled. Those are checkable behaviors rather than promises, and checking them takes less time than reading a privacy policy that may be boilerplate.&lt;/p&gt;

&lt;p&gt;If a tool requires an account just to view a chart, ask why. Sometimes there is a real reason such as saving charts across devices. Often there is not, and the account exists to build a user list or enable marketing rather than to serve you.&lt;/p&gt;

&lt;p&gt;If the site publishes how long it keeps data and how to have it deleted, that is a good sign, though few astrology sites go that far. Absence of a written policy is not proof of bad intent, but it does mean you cannot hold the site to anything, and that is the risk you accept when you type real details into a form you do not control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical habits
&lt;/h2&gt;

&lt;p&gt;Use a date of birth you are comfortable with. If you are only exploring how a chart is built, a slightly shifted birth time is fine for seeing the mechanics. Do not reuse your real birth data on sites you do not trust, and do not reuse the same throwaway date across many sites if you care about being linked.&lt;/p&gt;

&lt;p&gt;Check whether a page works offline before entering anything real. If the chart still renders with the network disabled, the computation is local. That test takes ten seconds and tells you more than any privacy policy, because it is an observation rather than a claim.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tradeoff
&lt;/h2&gt;

&lt;p&gt;Local computation usually means fewer features: no cloud sync, no shared links, no server-side interpretation engine, and no way to recover a chart if you lose the device. That is a real cost, and for some people the convenience of a synced account is worth it.&lt;/p&gt;

&lt;p&gt;The point is not that server-side tools are malicious. It is that birth data is worth thinking about before you type it in, the same way you would think about typing a passport number into an unfamiliar form. The reasonable question is what the site gains from holding the data, not whether the site feels trustworthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  A reasonable standard
&lt;/h2&gt;

&lt;p&gt;You should be able to answer three questions about any astrology site before using it: does it compute locally, does it require an account, and does it say what it stores? If a site cannot answer those, treat your birth data as public and decide accordingly.&lt;/p&gt;

&lt;p&gt;That standard is not paranoid. It is the same standard you would apply to any small website asking for personal details, and applying it consistently is easier than trying to judge each site's intentions from its design.&lt;/p&gt;




&lt;p&gt;I built a Zi Wei Dou Shu chart engine that runs entirely in the browser — no signup, no server, birth data never leaves the device. If you want to see the result: &lt;a href="https://mingpan-1xu.pages.dev" rel="noopener noreferrer"&gt;mingpan-1xu.pages.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>infosec</category>
      <category>privacy</category>
      <category>security</category>
    </item>
    <item>
      <title>Every Zi Wei Dou Shu app gets foreign births wrong — here is the timezone bug</title>
      <dc:creator>Yi Xu</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:36:16 +0000</pubDate>
      <link>https://dev.to/xuyi676/every-zi-wei-dou-shu-app-gets-foreign-births-wrong-here-is-the-timezone-bug-4aje</link>
      <guid>https://dev.to/xuyi676/every-zi-wei-dou-shu-app-gets-foreign-births-wrong-here-is-the-timezone-bug-4aje</guid>
      <description>&lt;p&gt;I spent two weeks building a Chinese astrology chart engine before I realised the hard part was not the astronomy.&lt;/p&gt;

&lt;p&gt;Zi Wei Dou Shu (紫微斗数) maps a birth moment onto twelve palaces and 108 stars. The algorithm is deterministic and well documented. I had it running in two days. What took another two weeks was one line of arithmetic that nobody had questioned:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;longitude&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// minutes of true solar time correction&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What 120 means
&lt;/h2&gt;

&lt;p&gt;Every Chinese astrology implementation I looked at contains this formula. It converts clock time to &lt;strong&gt;true solar time&lt;/strong&gt; — the actual position of the sun at the birthplace, which is what the system uses to decide the two-hour "hour pillar".&lt;/p&gt;

&lt;p&gt;&lt;code&gt;120&lt;/code&gt; is 120°E, the central meridian of UTC+8. The formula says: your clock shows Beijing-standard time, so correct it by 4 minutes per degree of longitude difference between the birthplace and 120°E.&lt;/p&gt;

&lt;p&gt;That is correct — &lt;strong&gt;if your user was born in China.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens in New York
&lt;/h2&gt;

&lt;p&gt;Take a birth at 14:30 in New York. Longitude −74.0°.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(−74.0 − 120) × 4 = −776 minutes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Subtract 776 minutes and you land at 01:34 the previous day. The hour pillar moves, the lunar date moves, and because the Life Palace is derived from the birth month and hour, &lt;strong&gt;all twelve palaces rotate&lt;/strong&gt;. A different chart entirely.&lt;/p&gt;

&lt;p&gt;The correct meridian for New York is not 120. It is the central meridian of the zone the user was born in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;offset = (birthLongitude − timezoneCentralMeridian) × 4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;New York is UTC−5 in winter, so the meridian is −75°. Get offset = (−74.0 − (−75)) × 4 = &lt;strong&gt;+4 minutes&lt;/strong&gt;. Not −776.&lt;/p&gt;

&lt;p&gt;Four minutes versus thirteen hours. And four minutes matters: the hour pillar boundary is every 120 solar minutes, so a few minutes is enough to flip 未 (Goat) to 申 (Monkey) and re-derive the whole chart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Daylight saving makes it worse
&lt;/h2&gt;

&lt;p&gt;You cannot hardcode UTC−5 for New York. Half the year it is UTC−4.&lt;/p&gt;

&lt;p&gt;Worse, the rules changed over time. The US moved its DST start date in 1987. The EU has changed its end date. Australia's states disagree with each other. If someone was born in 1975 in a country that has since abolished DST, only a real timezone database knows.&lt;/p&gt;

&lt;p&gt;I store an IANA name (&lt;code&gt;America/New_York&lt;/code&gt;) and resolve the offset &lt;strong&gt;at the birth date&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;tzOffsetHours&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tzName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Probe at 12:00 UTC. DST switches happen overnight,&lt;/span&gt;
  &lt;span class="c1"&gt;// so noon is always safely on one side of the boundary.&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;probe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;UTC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;dtf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DateTimeFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'en-US'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;timeZone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tzName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;hour12&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'numeric'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'2-digit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'2-digit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'2-digit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;minute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'2-digit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'2-digit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dtf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;formatToParts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;probe&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;get&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;asUTC&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;UTC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'year'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'month'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'day'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'hour'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'minute'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'second'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;asUTC&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;probe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;3600000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Intl.DateTimeFormat&lt;/code&gt; with a &lt;code&gt;timeZone&lt;/code&gt; is in every modern browser and Node. No library, no tzdata bundle, no server round-trip. It handles historical rules correctly because the platform ships the IANA database.&lt;/p&gt;

&lt;h2&gt;
  
  
  The date trap
&lt;/h2&gt;

&lt;p&gt;There is a second bug hiding behind the first one.&lt;/p&gt;

&lt;p&gt;The lazy fix for foreign births is "convert the local time to Beijing time, then run the China logic". Do not do this.&lt;/p&gt;

&lt;p&gt;If the birth was at 20:00 in New York, Beijing time is 09:00 the next day. You have just changed the &lt;strong&gt;date&lt;/strong&gt;, which is what the lunar month is computed from. The month determines the Life Palace. So converting the clock also moves the chart.&lt;/p&gt;

&lt;p&gt;The correct model is: use the &lt;strong&gt;local calendar date at the birthplace&lt;/strong&gt;, and derive the hour pillar from &lt;strong&gt;local true solar time at the birthplace&lt;/strong&gt;. The chart is about that moment in that place. It does does not know or care what time it was in Beijing.&lt;/p&gt;

&lt;p&gt;Concretely:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// right&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;solar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;localClockMinutes&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;birthLongitude&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;meridianOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;place&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// wrong — shifts the date&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;beijingClock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;localClockMinutes&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;meridianOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;place&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What I ended up building
&lt;/h2&gt;

&lt;p&gt;A chart engine that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;takes an IANA timezone per birthplace (74 world cities at the moment, plus all Chinese provinces)&lt;/li&gt;
&lt;li&gt;resolves the UTC offset at the birth date, DST included&lt;/li&gt;
&lt;li&gt;computes true solar time from the correct local meridian&lt;/li&gt;
&lt;li&gt;keeps the local calendar date untouched&lt;/li&gt;
&lt;li&gt;runs entirely client-side, so the birth data never leaves the browser&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The chart page is fully English — palace names, 76 star names romanised, and a nine-chapter reading generated from the same chart data by a separate English engine rather than machine-translated from Chinese.&lt;/p&gt;

&lt;h2&gt;
  
  
  The general lesson
&lt;/h2&gt;

&lt;p&gt;The bug was not in the astrology. It was in an &lt;strong&gt;unstated assumption&lt;/strong&gt; baked into every implementation: &lt;em&gt;the user is Chinese and in China.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That assumption is invisible because it is correct for 99% of the codebase's history. It only surfaces when you try to take a mature system to a new audience. If you are porting anything with a geographic or temporal assumption in it — timezones, address formats, calendar systems, name order — audit the arithmetic before the UI. The arithmetic is where the assumption is hiding.&lt;/p&gt;




&lt;p&gt;I wrote this up because it cost me two weeks and I could not find it written down anywhere. If you are porting a calendar or timezone-sensitive system, I would like to hear how you handled the historical DST problem.&lt;/p&gt;

&lt;p&gt;The tool is at &lt;a href="https://mingpan-1xu.pages.dev" rel="noopener noreferrer"&gt;mingpan-1xu.pages.dev&lt;/a&gt; if you want to see the result.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
