I was just curious…
Why has it been chosen in the RFC, that dates are represented as seconds since UNIX epoch?
Why wasn’t either milliseconds since UNIX epoch chosen (as .getTime()
of JavaScript’s Date
type returns) or ISO 8601 (as .toJSON()
of JavaScript’s Date
type returns) – both of which the Date
constructor also allows. I use JWTs quite extensively, and it has always puzzled me, as to why this format what chosen, as it is not very “JavaScript natural”.
To me JSON is JavaScript Object Notation, and therefore it makes sense to use some JavaScript native date formatting?
So, I really just wanted to ask about the rationale.
I apogolize in advance if this has been answered before.