Convert the string to a timestamp if needed, then you can just do maths on it. Unix epoch timestamps just count seconds, so to add 12 hours to a timestamp you add 43200 (60 * 60 * 12)
This thread is amazing and contains everything you could ever need for time manipulations in HA: The EPIC Time Conversion and Manipulation Thread!