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
is the four-digit year.MM
is the two-digit month.DD
is the two-digit day.T
is a literal character separating the date and time components.hh
is the two-digit hour (24-hour clock).mm
is the two-digit minute.ss
is the two-digit second.Z
indicates that the time is in Coordinated Universal Time (UTC). If the time is not in UTC, a timezone offset replacesZ
, formatted as+hh:mm
or-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