diff options
author | Rafael Ascensão <rafa.almas@gmail.com> | 2021-09-25 23:47:08 +0100 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2021-09-27 13:14:17 +0800 |
commit | ed5886921bcce0d1a261a37aa83bf135259b7d21 (patch) | |
tree | 1bdf9179310ed0ecd57c471403e2b3c2aaabb033 /flake.nix | |
parent | 24ba762f5cc5e13e02de54450f13ac4ccb639bee (diff) | |
download | fork-ledger-ed5886921bcce0d1a261a37aa83bf135259b7d21.tar.gz fork-ledger-ed5886921bcce0d1a261a37aa83bf135259b7d21.tar.bz2 fork-ledger-ed5886921bcce0d1a261a37aa83bf135259b7d21.zip |
Fix --time-colon for negative time amounts
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>
Diffstat (limited to 'flake.nix')
0 files changed, 0 insertions, 0 deletions