Skip to content
ShiftlyDevelopers
Documentation menu

Times, dates and timezones

Timestamps carry an offset. Date-only values and day boundaries are in the location's timezone.

Timestamps

A moment in time, such as a shift's start or a timesheet's end, is an RFC 3339 timestamp with an offset: 2026-10-06T09:00:00+11:00. Send any offset you like, including Z; Shiftly stores the instant and answers with the same instant. Timesheet times are kept to the minute: a start of 09:00:30 is stored as 09:00.

Dates

A calendar day, such as a leave request's start_date or a list's from and to, is a plain date: 2026-10-06. It has no offset, because it means that day where the record lives. For a shift or timesheet list that is the location's timezone; for leave, the business's first location.

Day boundaries

A from and to range is inclusive of both days and runs from midnight to midnight in each location's timezone. Asking for from=2026-10-05&to=2026-10-05 at a Sydney location returns shifts starting between 2026-10-05T00:00:00+11:00 and 2026-10-05T23:59:59+11:00; the same request at a Perth location uses +08:00. Never convert a date to a UTC instant yourself.

Roster weeks

A roster week starts on the business's pay week start day, at midnight in the location's timezone. The business resource carries pay_week_start_day; use it to line your product's week up with Shiftly's.

Daylight saving

Sydney, Melbourne, Hobart, Canberra and Adelaide observe daylight saving; Brisbane, Darwin and Perth do not. A shift across the change is as long as the clock says: paid_hours on a shift that spans the spring-forward is an hour less than the difference between its wall-clock times. Always work from the timestamps, which carry the offset, rather than from wall-clock arithmetic.

  • Locations carry each location's timezone as an IANA name such as Australia/Sydney.