Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You need to do some kind of arithmetic with dates and times.
If you can't get the answer you need using the date command (see Section 11.3, "Automating Date Ranges"), convert your existing dates and times to Epoch seconds using Section 11.4, "Converting Dates and Times to Epoch Seconds," perform your calculations, then convert the resulting Epoch seconds back to your desired format using Section 11.5, "Converting Epoch Seconds to Dates and Times."