4 ms·
> > is it time, or just a number? > Yes :) > That's the beauty of it: time is just a number (of seconds since 1 January 1970). > > Which scalar data type sho
by growse 7y ago
> > is it time, or just a number?
> Yes :)
> That's the beauty of it: time is just a number (of seconds since 1 January 1970).
> > Which scalar data type should your parser use?
> Integer, since it's an integer number of seconds.
> > And is it seconds since epoch or milliseconds since epoch?
> Unix time is always seconds.
Whilst time can indeed be modelled as "just a number", Unix time spectacularly fails to achieve even that.
* It can go backwards
* Simple subtractions do not give accurate intervals
It's not a good measure of time. Don't use it as such.