I'm trying to add minutes to the current time using date. This works for adding 5 minutes:

$ date -v "+5M"

But if I try using -v with a formatting argument, it fails and prints the help menu:

$ date "+%r" -v "+5M"
date: illegal time format

Is it possible to use the %r formatting with -v?


1 Answer 1


Put "+%r" after the "+5M":

$ date -v "+5M" "+%r"
02:25:14 PM

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .