On Thu, Apr 16, 2015 at 1:43 AM, Lennart Regebro <regebro at gmail.com> wrote: > On Wed, Apr 15, 2015 at 11:10 AM, Chris Angelico <rosuav at gmail.com> wrote: >> Bikeshed: Would arithmetic be based on UTC time or Unix time? It'd be >> more logical to describe it as "adding six hours means adding six >> hours to the UTC time", but it'd look extremely odd when there's a >> leap second. > > It would ignore leap seconds. If you want to call that unix time or > not is a matter of opinion. Hm. I guess the internal representation > *could* be EPOCH + offset, and local times could be calculated > properties, which could be cached (or possibly calculated at > creation). I was just talking about leap seconds, here (which Unix time ignores), not about the internal representation, which is an implementation detail. If a timedelta is represented as a number of seconds, then "adding six hours" really means "adding 6*3600 seconds", and most people would be VERY surprised if one of those is "consumed" by a leap second; but it ought at least to be acknowledged in the docs. ChrisA
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4