One morning in May 2026, I looked at the KashBoss dashboard and saw two numbers that could not both be true. The summary card said 14 invoices today. The daily sales chart, right below it, said 8.
The six missing invoices had been made between midnight and about 1:30 in the morning, Cairo time. The chart grouped sales by day using universal time (UTC, the world's reference clock), which in Egyptian summer is three hours behind Cairo. For the chart, those late-night sales still belonged to yesterday. The card was right, the chart was wrong, and an owner looking at both would trust neither.
Time is the first of three things in a SaaS that depend on where your customer is. The other two are taxes and money, and language. AI assistants handle all three the way the most common country would, which is usually not yours.
The short answer
Store every moment once in a universal form, and convert to the customer's local time only to display it or to decide which day or month a record belongs to. Keep tax switched off until the owner turns it on, format money from the company's currency instead of hard-coded symbols, and keep all interface text outside the code. Decide these before your first report, because fixing them later touches everything.
Time: the day boundary is where bugs live
A flight that lands at 18:00 in London lands at 20:00 on a Cairo clock: one moment, two readings. Daylight saving time, which moves clocks forward in summer, shifts day and month boundaries twice a year.
Step 1: Make the database think in the customer's time zone
Around the end of the month, sales made just after midnight landed in the wrong day and sometimes the wrong month, because every database function that asked "what is today?" or "this month?" answered in UTC. All our customers were in Egypt, so I asked for the simplest fix. The assistant changed one database setting so that "now", "today" and "this month" use Cairo time. The stored moments did not change at all; only the way the database divides them into days.
One setting for the whole database only works if all your customers share one time zone. If you serve several countries, store a time zone on each company and calculate "today" and "this month" with it.
Step 2: Show the time the cashier saw
Each invoice stores three time facts: when the server recorded it, what the cashier's device clock read, and the device's offset from UTC in minutes. In May a cashier made 12 sales one day and the web page showed 6, because the code read the device time but dropped its offset, so a sale at 12:33 in the morning appeared as 9:33 the previous evening. One helper that reads both fields fixed it, and because it uses whatever offset the device stored, it handles daylight saving without special code.
When fixing a pattern like this, search for every place that reads a date, not only the obvious spelling. Our first search missed a small helper under another name.
Calendar arithmetic can lie too. In our language, Dart, asking for February 31 does not raise an error; it quietly returns March 3. Monthly recurring entries scheduled on the 29th, 30th or 31st slid into the following month. The fix clamps to the last day of the month and remembers the original day, so a monthly entry on the 31st becomes April 30, then May 31.
Taxes must never switch themselves on
Tax rules differ by country, product and customer, and many countries now require electronic invoicing. Never claim to be compliant with a tax system you have not fully built and tested.
In August a customer asked why his purchase invoices suddenly had tax on them. He had never turned tax on. Merely opening the tax screen had created three default rates, with the highest as the default, without asking and without a message. From then on every purchase line for a product without its own tax setting got that rate. When items were added by scanning a barcode, no window opened, so the user never saw it. The on/off switch did nothing once rates existed, and the screen had no delete button. The proof was a clean break in one customer's data: every purchase invoice before the date the rates appeared had zero tax, and the first one after it had exactly the default rate.
The fix made the switch the only gate: rates are created when the owner turns tax on, not when a screen opens. Before shipping it we switched tax on for accounts that really use it, otherwise it would have vanished for them overnight. We removed planted rates only for the customer who reported it, because nobody else had asked us to touch their data.
Money follows the company's currency
When a company from Iraq on a free trial wanted to subscribe, the assistant first separated two requests. Multi-currency, meaning one company trading in several currencies with exchange rates, is weeks of work and nobody had asked. One currency per company was much smaller. The real job was hiding in plain sight: the pound symbol was typed directly into the code 1,540 times.
We built one central function for formatting money, not a visual component, because money also appears in PDFs, Excel files, WhatsApp messages and thermal receipts. Decimals follow the currency: the Kuwaiti dinar uses three, the Iraqi dinar normally none. Quantities, weights and percentages were deliberately left out, otherwise a shop selling 2.5 kilos would see "3". The key protection is that a company's currency is locked after its first transaction. Changing it later would not convert any numbers; it would only change the label, so five thousand pounds would silently become five thousand dinars.
One language, done properly
Put every word on screen in translation files from day one. Our 1,540 hard-coded currency symbols are the same disease as hard-coded sentences: cheap on day one, expensive forever. We also wrote all interface text in formal Modern Standard Arabic rather than Egyptian dialect, so users elsewhere in the region do not feel the app was made only for Egypt.
Right-to-left (RTL) languages such as Arabic and Hebrew flip layouts, icons, tables and punctuation, and produced a steady stream of surprises:
- Direction arrows flip automatically, so hand-picked arrows pointed different ways on different screens. One shared component now decides every arrow.
- Our PDF library ignored text direction for tables, so exported tables came out mirrored. We rebuilt them from rows, which respect direction.
- Some Arabic letters printed wrongly because they shared a drawing in the font file. We switched to a font where every letter has its own drawing, plus a test that fails if any PDF uses the old font.
- Search failed on letter variants and double spaces. We normalize them the same way in the app and the database.
Key takeaways
- Store the moment once; convert to local time only to display it or to decide its day and month.
- Day and month boundaries, daylight saving time and month arithmetic are where time bugs hide.
- Tax must never switch itself on, and "compliant" is a word you earn by testing.
- Money is a symbol plus a number of decimals, and both must follow the company's currency.
- Put every word in one place from day one.
Chapter 20 of the book has the full checklist and a midnight test you can run on your own app.
Frequently asked questions
Should I store dates in UTC or local time?
Store the moment in a universal form such as UTC, and convert to the customer's time zone when you display it or decide which day or month it belongs to. Be careful with reports and charts, which are where UTC-based grouping puts late-night sales on the wrong day.
How many decimal places should a currency use?
It depends on the currency. The Kuwaiti dinar uses three, the Iraqi dinar is normally written with none, and most others use two. Format money with a central function that reads the company's currency, and leave quantities and percentages out of it.
How do I prepare a SaaS app for several languages?
Keep every user-facing sentence in translation files from the start, format money and dates from company settings, and test layouts, PDFs and search in any right-to-left language you plan to support.