Beeminder API serialisation format for DateTimes

So, the API right now uses at least two formats:

"panic": 54000,
"updated_at": 1579302469,
"burner": "frontburner",
"yaw": -1,
  • An ISO 8601 formatted String such as “2020-01-18T12:10:32-05:00”, e.g.:
"contract": {
  "amount": 5,
  "stepdown_at": null,
  "pending_amount": 5,
  "pending_at": "2020-01-18T12:10:32-05:00"
}

Is there any more? Why is there more than one in use?
Also see this other example:

"contract": {
  "amount": 5,
  "stepdown_at": 1579474800,
  "pending_amount": null,
  "pending_at": null
},

Here, "stepdown_at" is a number, whereas its sibling "pending_At" was a String in the previous example. Why do they have different types?

Some places are just the date using the “daystamp” format (four digit year followed by two digit month followed by two digit day) such as “20200630” to represent June 30th in 2020.

1 Like

daystamp corresponds to a specific goal’s day and it takes both timezone and the goal’s deadline into account.

1 Like