dateutils
dateutils copied to clipboard
Negative value when changing format string
$ dateutils.ddiff -f "%d day(s), %H hour(s) and %M minute(s)" "2020-11-10 07:00" now
0 day(s), 4 hour(s) and 21 minute(s)
$ dateutils.ddiff -f "%H hour(s) and %M minute(s)" "2020-11-10 07:00" now
-4 hour(s) and 21 minute(s)
I'm not sure where the negative is suddenly coming from can anyone help?
Hiya, the negative sign is because your now previously (in terms of UTC) was earlier than 7 o'clock. The bug you're seeing has been addressed in a3d267fd4. It was because ddiff's printer is (was) unable to print -0.
Oh okay can I close the issue now since it's fixed?
Well, fine by me. Problem is you'd either have to use the git version for now or wait for the release. You're not using ubuntu snaps by any chance?
Debian Unstable is what I use.