summaryrefslogtreecommitdiff
path: root/test/regress/1176.test
Commit message (Collapse)AuthorAgeFilesLines
* Fix --time-colon for negative time amountsRafael Ascensão2021-09-271-0/+23
While the current formula works for positive numbers, negative numbers are incorrectly represented. One of the issues comes from the fact that floor(x) < x for every x. `amount_t precision` will always be a non negative number and the code that attempts to fix the issue for negative number will never run. If we truncate the number instead, the current formula works for both positive and negative numbers without making negative numbers a corner case. So let's do that. Signed-off-by: Rafael Ascensão <rafa.almas@gmail.com>