libfaketime icon indicating copy to clipboard operation
libfaketime copied to clipboard

Can I combine relative timespans?

Open buhtz opened this issue 3 years ago • 2 comments

It seems to me that I can not do something like this.

faketime "-2d +3h" date

This means 2 days into the past but 3h into the future. Or you could say 45 hours into the past (2x24 - 3).

buhtz avatar Oct 08 '22 12:10 buhtz

You're right that this does not work. It expects a (single) value, not an arbitrary expression.

It's a time machine, not a calculator. :-)

However, there should be CLI-based date/time calculating tools around to combine with.

wolfcw avatar Oct 09 '22 08:10 wolfcw

I see. But an error should be thrown when something like this is given.

buhtz avatar Oct 09 '22 08:10 buhtz