Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
time: Round broken for d > 2^62, r >= 2^62 #19807
time.Round uses r+r < d to decide whether the remainder is above or below the halfway (round up or round down) point. This is wrong when r+r wraps negative, because it should be > d but looks < d.
No one will ever care about rounding to a d > 2^62 (d > 146 years), but might as well get it right.
CL on its way.