35
karma
6y

API endpoint 1: needs dates in utc formatting

API endpoint 2: needs dates formatted yyyy-mm-dd

Comments
  • 0
  • 0
    @japzio I know right????
  • 5
    Standards are there for a reason. People tend to focus on their own, without realizing the internet reaches everywhere. You can't imagine the number of APIs that don't give their time in UTC (some even give you a different one depending on the location they got from the IP address!!).
    There should be a website that lists "bad" APIs, and why they are bad.
  • 0
    Why not (new Date()).getTime()?
  • 1
    @aritzh this is one api, made by one dev, I guess he has no standards 😇
  • 1
    I've worked in a project that have 6 different formats of date on the API
  • 1
    IMO this doesn't need to be a concern of APIs, the frontend should take care of it.

    I mean, whats wrong with using UNIX epoch-based timestamps? No ambiguity there. Plus they're integer values.

    Unless of course the APIs are designed to do some kind of timr calculation based on human or textual file input.
  • 0
    stilly yyyy-mm-dd is an ISO standard. So technically this is the correct way.
  • 0
    Don't see a problem, you are lucky API2 is not wrapped like 8 times, parsing json arrays till you reach it.
Add Comment