Date Handling
Overview
One Record API handles date and time information, including the format used and how timezones are managed. For correctly formatting date and time data in requests and interpreting responses, the API follows ISO 8601 format.
Date and Time Format
One Record API uses the ISO 8601 format for all date and time information. This format is internationally recognized and ensures clear, unambiguous communication of date and time data.
YYYY-MM-DDThh:mm:ssZYYYYis the four-digit year.MMis the two-digit month.DDis the two-digit day.Tis a literal character separating the date and time components.hhis the two-digit hour (24-hour clock).mmis the two-digit minute.ssis the two-digit second.Zindicates that the time is in Coordinated Universal Time (UTC). If the time is not in UTC, a timezone offset replacesZ, formatted as+hh:mmor-hh:mm.
A date without time can use the short YYYY-MM-DD format.
Timezone Handling
Default Timezone
In the absence of a timezone offset, One Record API treats the date and time as being in Greenwich Mean Time (GMT). This convention is adopted for simplicity and to provide a consistent baseline across different timezones.
Specifying Timezone Offsets
Specifying a timezone, include the offset from UTC in the date and time string, can be done using the format +hh:mm or -hh:mm. Here are examples to illustrate both cases:
With Timezone Offset:
2024-03-16T12:00:00+01:00— This indicates that the time is one hour ahead of UTC.Without Timezone Offset (Assumed GMT):
2024-03-16T11:00:00— Without an offset, the time is assumed to be GMT.
UTC and GMT
For One Record API, GMT and UTC are considered equivalent. However, to eliminate any ambiguity, it is recommend to use Z to explicitly denote UTC for times that are in Coordinated Universal Time, e.g. 2024-03-16T11:00:00Z.
Last updated