如何计算两个持续时间之间的差异?

如何计算两个持续时间之间的差异?

这是我尝试过的

$ dateutils.ddiff 02:15:00 00:26:00
-6540s
$ dateutils.ddiff -i %T  02:15:00 00:26:00
-6540s
$ dateutils.ddiff -i "%T"  02:15:00 00:26:00
-6540s
$ dateutils.ddiff -i "%T" "02:15:00" "00:26:00"
-6540s
$ dateutils.ddiff -i "%T" "02:15:00" -i "%T" "00:26:00"
-6540s

无法弄清楚。所需输出:01:49:00

答案1

$ dateutils.ddiff -f "%0H:%0M:%0S" 02:15:00 00:26:00
-01:49:00

相关内容