3 ms·
Every time I see news like this, the voice in me that is saying "timestamps should be represented as epoch-time integers" grows louder. The amount of pain I've
by tgsovlerkhgsel 3y ago
Every time I see news like this, the voice in me that is saying "timestamps should be represented as epoch-time integers" grows louder. The amount of pain I've seen "better" solutions bring feels like the benefits aren't worth it unless you need some very specific feature (e.g. you're not trying to express an absolute time but repeating calendar events).
- globular-toast 3y agoTimestamps yes, but you can't represent meaningful future times that way. You should also record the timezone with the timestamp, though. An epoch-time integer will unambiguously tell you what time something was recorded at, but it can't tell you what the time on the clock was at that time. If you're doing some kind of data analysis on user habits, for example, you almost certainly want to work with user local times, not UTC.