I got stuck in part of the script. I have time: for example "16:00" and duration in minutes like: 410.
Is there any easy way to add those two values? I've tried a lot of combinations with date -d
, but can't solve it.
I got stuck in part of the script. I have time: for example "16:00" and duration in minutes like: 410.
Is there any easy way to add those two values? I've tried a lot of combinations with date -d
, but can't solve it.
Try this (Kysu's version):
or this:
But do not use this:
Strange things happen if you omit the word
today
but keep the+
. (I think the+ 410
is being parsed as a timezone modifier, and then theminutes
is interpreted as "add one minute".)