Developers
Menu

Dates and time zones

Time tracking is mostly about time, so the rules here are strict and the same everywhere.

Instants: ISO 8601, answered in UTC

A moment in time — a start, an end, when something was created — is an ISO 8601 date-time.

Store instants as UTC and convert for display. Every language has a well-tested way to do that; don't do the arithmetic by hand.

Days: YYYY-MM-DD in a named time zone

A day — a report range, a filter, the day an entry is booked to — is a plain date such as 2026-09-30. A date only means something in a time zone, so Punchly always says which one:

Always use IANA names (Europe/London), never abbreviations (BST) or fixed offsets: names know about daylight saving, offsets don't.

Durations: whole seconds

Durations are integers in seconds, and their names end in S or Seconds: durationS, workS, breakS, overtimeS, totalSeconds.

Money: minor units and a currency

Amounts and rates are integers in the currency's minor unit — cents, pence, paise — with names ending in Minor, and a currencyCode (ISO 4217) beside them:

json
{ "billableRateMinor": 7500, "billableAmountMinor": 33750, "currencyCode": "USD" }

That is a rate of 75.00 an hour and an amount of 337.50. Integers mean no floating-point surprises when you add up a month.

A rate or amount is null when the key's owner may not see money in that workspace — the same rule as in the app. Use an owner's or admin's key if your integration needs them.

Ids

Every id is a UUID (for example 01928f3e-7a1c-7d2e-9b1a-3c4d5e6f7a8b). Treat it as an opaque string: compare it, store it, send it back; don't parse it.