3 ms·
1. You could use a float. 2. Probably in the documentation of whatever it is that's using it
by Minor49er 7y ago
1. You could use a float. 2. Probably in the documentation of whatever it is that's using it
- nitrogen 7y agoEpoch floats and doubles are not good for timestamps, as the further we get from 1970 the less precise they become. Current precision with a 32-bit float (JSON/JavaScript are 64-bit usually, though in non-JS it's common to use Bigdecimal in slight non-compliance) is much worse than one second.
- ci5er 7y agoFloats are ugly because the distance between any two successive numbers are not the same. This makes them inappropriate for discretized time and anything accounting-related (money).
- stickfigure 7y ago> in the documentation of whatever it is that's using it That's the point, timestamps should be self-describing. If "look up the structure in documentation" suffices we might as well just use protobufs.
- eyelidlessness 7y ago1. YUK 2. ISO 8601 is a better format for this.