@st3fan here’s what we found:
The inconsistency between the formats of the different fields in the
push event is known, at least by the people who manage the webhooks. The origin of this is murky—the TL;DR version of that is “historical reasons”. The
push event is one of the oldest events in the API.
The problem with changing the format of an existing field is that this would break a huge number of apps and scripts. We could do it, but not everyone follows the change blog, and we currently don’t have a consistent way of messaging small (but -ahem- powerful) changes like this.
We will, eventually make a major version update of all the webhooks, at which point we will make these fields consistent.
On the positive side, the fields that are ISO-8601 strings are always ISO-8601 strings, and the fields that are Epoch integers are always Epoch integers, so while the inconsistency is understandably annoying, defining the types in Go or Swift should not be a problem, since any one field will always have a consistent format.
Speaking as a Go developer with a very strong preference for consistency, I feel your pain