17 ms·
I would argue that "seconds since epoch in UTC" has an explicit timezone of UTC.
by sanderjd 4y ago
I would argue that "seconds since epoch in UTC" has an explicit timezone of UTC.
- BoiledCabbage 4y agoA point on the globe has a timezone. "Distance from London in feet" does not.
- mannykannot 4y agoThat is true, but a timestamp is intended to specify a particular time, and a simple temporal interval fails to do that just as a simple spatial interval fails to specify a location; both are incomplete (the former on account of a missing starting point, and your counter-example on account of a missing azimuth.) On the other hand Unix (POSIX) time does not have leap-seconds, while UTC does not, so it is no longer "in" UTC.
- yakubin 4y agoPOSIX time isn’t “in UTC” regardless of that. UTC is just one of many timezones you can use when specifying which point in time timestamp 0 refers to. You could just as well use EST or anything else.
- mannykannot 4y agoYou are right - through this discussion, I have come to see that unless a value expresses a specific time (as opposed to interval) in a form that includes hours and minutes, then timezone is not an applicable concept. POSIX time does not do this.
- P5fRxh5kUvp2th 4y agoThis should be files under "falsehoods programmers believe about timezones".
- sanderjd 4y agoSo the analogy is "Distance from London in feet" to "Time since epoch in seconds"? Ok, but "epoch" has a timezone, which is UTC, so measurements relative to that have the same timezone.
- P5fRxh5kUvp2th 4y agoI agree with you and I think the above poster needs to adjust their thinking. What they're saying is correct in the most technical sense, but our industry has landed on timestamps not needing timezones. If they want to work in this industry, they need to accept that. It's ok to be surprised by something like this, it's less ok to argue about it.