From 05702243de3800718505bc244ec20cdaffc284d0 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Thu, 2 Nov 2023 20:03:53 +0100 Subject: [PATCH] Use RFC3339 for Timestamp (#522) * Use RFC3339 for Timestamp --------- Co-authored-by: Fabien Richard-Allouard --- gbfs.md | 66 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/gbfs.md b/gbfs.md index 3bf51df4..1230e1d2 100644 --- a/gbfs.md +++ b/gbfs.md @@ -224,7 +224,7 @@ Example: The `rental_methods` field contains values `creditcard`, `paypass`, etc * Phone Number *as of v3.0-RC* - Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I/en) format. The phone number MUST start with a "+". The characters following the "+" MUST be integers and MUST NOT contain any hyphens, spaces or parentheses. * String - Can only contain text. Strings MUST NOT contain any formatting codes (including HTML) other than newlines. * Time - Service time in the HH:MM:SS format for the time zone indicated in `system_information.json` (00:00:00 - 47:59:59). Time can stretch up to one additional day in the future to accommodate situations where, for example, a system was open from 11:30pm - 11pm the next day (23:30:00-47:00:00). -* Timestamp - Timestamp fields MUST be represented as integers in POSIX time (representing the number of seconds since January 1st 1970 00:00:00 UTC). +* Timestamp - Timestamp fields MUST be represented as strings in [RFC3339 format](https://www.rfc-editor.org/rfc/rfc3339), for example `2023-07-17T13:34:13+02:00`. *(as of v3.0-RC2)* * Timezone - TZ timezone from the https://www.iana.org/time-zones. Timezone names never contain the space character but MAY contain an underscore. Refer to https://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. Example: `Asia/Tokyo`, `America/Los_Angeles` or `Africa/Cairo`. * URI - A fully qualified URI that includes the scheme (for example, `com.example.android://`). Any special characters in the URI MUST be correctly escaped. See the following https://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URI values. Note that URIs MAY be URLs. @@ -257,7 +257,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 3600, "version": "3.0-RC", "data": { @@ -283,7 +283,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, "version": "3.0-RC", "data": { @@ -319,7 +319,7 @@ Field Name | REQUIRED | Type | Defines **Example:** ```json { - "last_updated":1667004473, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl":0, "version":"3.0-RC", "data":{ @@ -370,7 +370,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, "version": "3.0-RC", "data": { @@ -435,7 +435,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 1800, "version": "3.0-RC", "data": { @@ -547,7 +547,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, "version": "3.0-RC", "data": { @@ -730,7 +730,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, "version": "3.0-RC", "data": { @@ -770,7 +770,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, "version": "3.0-RC", "data": { @@ -861,7 +861,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, "version": "3.0-RC", "data": { @@ -871,7 +871,7 @@ Field Name | REQUIRED | Type | Defines "is_installed": true, "is_renting": true, "is_returning": true, - "last_reported": 1609866125, + "last_reported": "2023-07-17T13:34:13+02:00", "num_docks_available": 3, "num_docks_disabled" : 1, "vehicle_docks_available": [ @@ -902,7 +902,7 @@ Field Name | REQUIRED | Type | Defines "is_installed": true, "is_renting": true, "is_returning": true, - "last_reported": 1609866106, + "last_reported": "2023-07-17T13:34:13+02:00", "num_docks_available": 8, "num_docks_disabled" : 1, "vehicle_docks_available": [ @@ -964,14 +964,14 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated":1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl":0, "version":"3.0-RC", "data":{ "vehicles":[ { "vehicle_id":"973a5c94-c288-4a2b-afa6-de8aeb6ae2e5", - "last_reported":1609866109, + "last_reported": "2023-07-17T13:34:13+02:00", "lat":12.345678, "lon":56.789012, "is_reserved":false, @@ -984,7 +984,7 @@ Field Name | REQUIRED | Type | Defines }, { "vehicle_id":"987fd100-b822-4347-86a4-b3eef8ca8b53", - "last_reported":1609866204, + "last_reported": "2023-07-17T13:34:13+02:00", "is_reserved":false, "is_disabled":false, "vehicle_type_id":"def456", @@ -1002,14 +1002,14 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl":0, "version":"3.0-RC", "data":{ "vehicles":[ { "vehicle_id":"45bd3fb7-a2d5-4def-9de1-c645844ba962", - "last_reported":1609866109, + "last_reported": "2023-07-17T13:34:13+02:00", "lat":12.345678, "lon":56.789012, "is_reserved":false, @@ -1025,7 +1025,7 @@ Field Name | REQUIRED | Type | Defines }, { "vehicle_id":"d4521def-7922-4e46-8e1d-8ac397239bd0", - "last_reported":1609866204, + "last_reported": "2023-07-17T13:34:13+02:00", "is_reserved":false, "is_disabled":false, "vehicle_type_id":"def456", @@ -1065,7 +1065,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 86400, "version": "3.0-RC", "data": { @@ -1145,7 +1145,7 @@ The user does not pay more than the base price for the first 10 km. After 10 km ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, "version": "3.0-RC", "data": { @@ -1198,7 +1198,7 @@ This example demonstrates a pricing scheme that has a rate both by minute and by ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, "version": "3.0-RC", "data": { @@ -1264,7 +1264,7 @@ Field Name | REQUIRED | Type | Defines ```json { - "last_updated": 1604519393, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, "version": "3.0-RC", "data": { @@ -1279,8 +1279,8 @@ Field Name | REQUIRED | Type | Defines ], "times": [ { - "start": 1604448000, - "end": 1604674800 + "start": "2023-07-17T13:34:13+02:00", + "end": "2023-07-18T13:34:13+02:00" } ], "url": [ @@ -1301,7 +1301,7 @@ Field Name | REQUIRED | Type | Defines "language": "en" } ], - "last_updated": 1604198100 + "last_updated": "2023-07-17T13:34:13+02:00", } ] } @@ -1361,7 +1361,7 @@ See examples below. ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, "version": "3.0-RC", "data": { @@ -1430,8 +1430,8 @@ See examples below. "language": "en" } ], - "start": 1593878400, - "end": 1593907260, + "start": "2023-07-17T13:34:13+02:00", + "end": "2024-07-18T13:34:13+02:00", "rules": [ { "vehicle_type_id": [ @@ -1647,7 +1647,7 @@ Other supported parameters include: ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, "version": "3.0-RC", "data": { @@ -1671,7 +1671,7 @@ Other supported parameters include: ```json { - "last_updated": 1640887163, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, "version": "3.0-RC", "data": { @@ -1699,7 +1699,7 @@ Note that the Android URI and iOS Universal Link URLs do not necessarily use the ```json { - "last_updated": 1572447999, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, "version": "3.0-RC", "data": { @@ -1725,7 +1725,7 @@ Note that the Android URI and iOS Universal Link URLs do not necessarily use the ```json { - "last_updated": 1609866247, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, "version": "3.0-RC", "data": { @@ -1751,7 +1751,7 @@ Note that the Android URI and iOS Universal Link URLs do not necessarily use the ```json { - "last_updated": 1609866247, + "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, "version": "3.0-RC", "data": {