You can use PHP's built-in function mktime
for this. With this, you can add or subtract from any part of a date by just using a plus (or minus) sign after the part you want to change. Here's an example of adding 1 to the minute part of a time:
$time_posted = '12:14';
// SPLIT APART THE HOUR AND MINUTE
list($hour, $minute) = explode(':', $time_posted);
$new_date = date("H:i", mktime($hour, $minute + 1, 0, date("m"), date("d"), date("Y")));
print $new_date;
This will output: 12:15
Here is a working demo
Edit:
I just saw that the time format can be in different formats. I don't really know what to tell you there other than you need to find a way to normalize the data. You should never rely on users to input whatever they want. Obviously this code will not work if it can't parse out hour and minute from the timestamp. You'd need to write a complex REGEX to search for all possible combinations of user-supplied combinations. Not something you want to do normally.