Dates and Time
Learn how dates should be formatted and returned in Kit.
Date Formats
All dates shall be strings formatted according to the ISO 8601 standard, including timezone definition:
-
2024-10-10T09:59:44+02:00
-
2024-10-10T09:59:44Z
Time Periods
Time periods refer to a length of time unbounded by specific timestamps. This is referred to as the resolution in Bright_Kit.
Examples include:
- year
- month
- day
- hour
- 15min
Time Intervals
Time intervals are always set between a fromDate
and a toDate
as query parameters in the request. The resolution
parameter is used to structure the response data for graphs viewed in that resolution.
-
fromDate
is always required. If requesting real time data use this field only. -
toDate
is sometimes required. -
resolution
is sometimes included in the request.
Responses for time interval requests
Response bodies shall always include a startDate
and endDate
to detail the time interval of the data. In cases where you cannot supply the same time interval as requested, provide startDate
and endDate
fields that match the response data.
Order of time series results
Responses which include values related to a startDate
and endDate
the data series should be returned chronologically. Do not send randomized results.
Updated 9 days ago