esi/esi-issues

Date formats inconsistent

Closed this issue · 2 comments

Inconsistency

date format are inconsistent among paths and headers

For an example, let's look at https://esi.evetech.net/latest/markets/10000002/orders/?datasource=tranquility&order_type=all and its specification https://esi.evetech.net/ui/#/Market/get_markets_region_id_orders

  • the "expires" header has value "Mon, 05 Feb 2024 10:47:59 GMT" which is consistent with its spec "RFC7231 formatted datetime string" and therefore the https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1 prefered format . This is fine
  • the first entry of the response has an "issued" field with swagger description "issued string" and actual value "issued": "2024-01-27T10:14:18Z" which is iso8601 local date time with offset (z=zero) . This is not fine, as the date format is not specified

Routes

basically all that return a response with a date.

Resolution

add the format of the date in the documentation, like "issued in iso8601 date time format" instead of "issued string"

Checklist

Check all boxes that apply to this issue:

Another date format is the date field of
https://esi.evetech.net/ui/#/Market/get_markets_region_id_history
Which is a day.

As far as I see it you're comparing HTTP headers with OpenAPI json-serialized data, which is two different beasts altogether.

In general, dates and datetimes are serialized using iso8601 in the JSON output, this can be seen in endpoints like https://esi.evetech.net/ui/#/Character/get_characters_character_id, https://esi.evetech.net/ui/#/Corporation/get_corporations_corporation_id and
https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id (Taking these since they are public so easier to verify).