I am working with a timestamp which is in the following format which I am told is know as  ISO 8601 : 2016-04-27T14:14:47.836ZI would like to be able to calculate the timestamp both 15 minutes and 30 minutes before the current timestamp. UPDATE: I need the output to be in the same format as the original timestampI have some code which retrieves the timestamp at any given time, but how can I get a script to calculate the timestamp at a given number of minutes before the current timestamp- for this example I would like to know both 15 minutes and 30 minutes before.Any help appreciated. 
Code to calculate 15/30 minutes before specified timestamp (GMT) in ISO 8601 format
linux;bash;timestamps
The first point of call would beman dateThere you may find the details on setting time with a relative offset, as indate --date '-15 minutes 2016-04-27T14:14:47.836Z'It also offers details about how to format the output.