Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

A global company has had repeated incidents from money rounding, currency conversion and time zone handling across 80 services in several languages. How would you prevent this class of problems at the organisation level?

I would treat this as a platform problem, not a series of team bugs: standardise money as an amount plus an ISO 4217 currency and time as UTC instants or local times with zone ids in shared API and event schemas, give every language a tested shared library and one reference conversion service with a single rate source, make finance the owner of rounding and conversion rules, and back it with contract tests on edge cases, ledger reconciliation and incident tracking by category.

Why this question is asked

When the same kind of incident repeats across 80 services, the problem is no longer a careless developer. It is that every team is solving money and time from scratch, in several languages, with slightly different rules. A principal engineer is expected to see the pattern and change the system that produces it. Interviewers ask this to hear how we combine technical standards with ownership and measurement. In this answer, we will diagnose why the incidents repeat, define standard representations, provide shared libraries and a conversion service, put finance in charge of policy, add tests and reconciliation, and measure whether it worked.

1Why the Same Incidents Keep Coming Back

Looking at a handful of incident reports usually shows a few causes. One service rounds each line, another rounds the total, so the totals never match. One uses a cached exchange rate from yesterday and another a live rate. A JavaScript client parses amounts as floating point. A Go service stores times as local server time. A Japanese yen amount is divided by 100 because a library assumed two decimals.

Each fix is local, so the next team repeats the mistake. The organisation lacks three things: a shared definition of how money and time are represented, a shared implementation, and an owner for the business rules. Our plan supplies each of them.

2Standard Representations in Shared Schemas

The first step is to write down the representations and publish them as schemas that APIs and events must use, for example in OpenAPI components and in the schema registry for Kafka events. Money is an object with an amount as a decimal string or integer minor units, and an ISO 4217 currency code. Instants are UTC timestamps in ISO 8601 format with a Z. Local times that people agree on, such as appointments or store opening hours, travel as a local date-time plus an IANA zone id.

Java
// shared schema, published once and reused by every service
Money { "amount": "1999.50", "currency": "EUR" } // decimal as string, never a float
Money { "amount": "1200", "currency": "JPY" } // zero decimal places
Instant "2026-11-05T14:03:22Z"
LocalSlot { "local": "2026-12-01T09:30", "zone": "Asia/Tokyo" }
Standard representations
ConceptOn the wireIn storageNever
Moneyamount string + ISO 4217 codeNUMERIC or minor units + currencyfloat, amount without currency
InstantISO 8601 with Ztimestamptz or UTC epochserver local time
Local event timelocal date-time + IANA zonetimestamp + zone idfixed offset only
Exchange raterate, source, timestamprate table with validityhard-coded constants

The reason for strings rather than JSON numbers is that many parsers, JavaScript in particular, turn numbers into binary floats. A schema check in CI rejects new APIs or events that use a bare number for money or a timestamp without an offset.

3Shared Libraries and One Conversion Service

Schemas say what the data looks like, but teams still need code that handles it correctly. So the platform team ships a small money and time library for each language in use, such as Java, Go, Python and TypeScript, built from the same specification and tested with the same shared test vectors. In Java it can wrap BigDecimal or Moneta; in TypeScript it can use a decimal library and never Number for amounts.

Currency conversion moves into one reference service, which is the single source of exchange rates and conversion rules. It records which rate was used and when, so any amount can be explained later. Services call it, or use its published daily rate tables, instead of fetching rates from their own providers.

Step throughWho owns what
  1. Finance policyrounding modes, rounding points, rate sources, documented with examples
  2. Shared schemasMoney, Instant, LocalSlot in API and event contracts
  3. Language librariesJava, Go, Python, TypeScript, same test vectors
  4. Conversion servicesingle rate source, records rate and time used
  5. Product servicesuse the libraries, never their own rules
  6. Reconciliationledger versus service totals, daily

6 layers, from the top down. Step through them one at a time.

4Finance Owns the Rules

Rounding is a business decision, not a technical one. Whether VAT is rounded per line or per invoice, which rounding mode applies, and which rate is used for a refund days after the sale differ by country and contract. When engineers guess, each team guesses differently. So finance becomes the owner of rounding and conversion policies, and writes them down with worked examples, such as three items at 0.333 EUR with 19 percent VAT, rounded per line, giving these exact totals.

Those worked examples become the shared test vectors. Every library and every service that handles money runs contract tests over them, including the edge cases that caused incidents: negative amounts for refunds, zero-decimal currencies like JPY, three-decimal currencies like KWD, amounts that round exactly at a half, times on DST change days, and dates around the end of a month in different zones.

5Reconciliation Catches What Tests Miss

Tests catch known cases; reconciliation catches drift in production. Every day, a job compares the totals in the general ledger, the accounting system of record, with the totals each service reports for the same period, per currency. A difference of a few cents across millions of orders points at a rounding rule applied in the wrong place long before a customer or an auditor finds it. Alerts go to the owning team, with the transactions that disagree.

6Measuring the Effect

Finally, we tag every incident with a category, such as rounding, conversion, time zone or precision, and report the count and cost per category each quarter. This shows leadership whether the standards work, shows which teams have not adopted the libraries yet, and keeps the investment justified. A reasonable goal is that new incidents in these categories fall steeply within a year, and those that remain come from services still on the migration list.

7Follow-up questions

How do we get 80 teams to adopt the libraries?

Make the right way the easy way: service templates include the libraries, schema checks in CI enforce the representations for new APIs, and the platform team migrates the services with the most incidents first. Teams adopt faster when they see the incident count fall for others.

Should every service call the conversion service live?

Not necessarily. For high volume, the service publishes rate tables with validity periods that clients cache. What matters is that every conversion uses a rate from the same source and records which rate it used.

What about legacy services that cannot change soon?

Wrap them. An adapter at their boundary converts their representation into the standard one, and reconciliation watches them closely until they are migrated.

8Conclusion

In this answer, we saw that repeated money and time incidents across many services come from missing shared definitions, shared code and ownership. We standardise money as amount plus ISO 4217 currency and time as UTC instants or local times with zone ids in shared schemas, provide tested libraries per language and a single conversion service, make finance the owner of rounding and conversion rules with worked examples turned into contract tests, reconcile the ledger with service totals, and track incidents by category to show the effect.

What to say in the interviewAbout 80 seconds aloud

Open with

With 80 services in several languages, these incidents repeat because every team solves money and time on its own. I would fix it at the platform level. First, standard representations: money is always an amount, as a decimal string or minor units, plus an ISO 4217 currency code; instants are UTC in ISO 8601; local event times are a local date-time plus an IANA zone id.

Then, if they want more

These go into shared API and event schemas, and CI rejects bare floats for money or timestamps without an offset. Second, shared implementation: a well-tested library per language built from one specification, and a reference conversion service that is the single source of exchange rates and records which rate was used.

Third, ownership: finance owns rounding and conversion policies, documented with worked examples, and those examples become contract tests that every library and service runs, including edge cases like refunds, JPY with zero decimals, half-way rounding and DST change days. Fourth, a daily reconciliation between the ledger and service totals per currency, so drift is caught early.

And finally I would categorise incidents and report them quarterly, which shows whether the standards are working and which services still need to migrate.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "A global company has had repeated incidents from money rounding, currency conversion and...": https://scrivio-interview-library.netlify.app/databases/data-modeling/a3fad6f7c4/