How do I change a part of a string variable in a dialplan?

Like this:
Set(TIME=${STRFTIME(${EPOCH},%g%m%d%H%M)})
This will set variable TIME to 0805302227 (YYMMDDHHMM)
I need to up the HH with one (1), so that the variable will read 0805302327 instead.

How do I do that?

Incrementing by 1 will give an invalid time for one hour per day. Instead, first use a Set(TimeZn=…) statement. For example, for the U.S. Eastern Time Zone where daylight savings time is observed, you can put this:

Set(TimeZn=EST5EDT)

If for some reason you are really trying to look ahead one hour it may be easier to just say you are one time zone further east than you really are (unless you are right up against the International Date Line) because then the system will take care of the midnight rollover, otherwise you’d have to do some math. However, you CAN do math in a dialplan - see the “Modified Speaking Clock routine with labels and multiple entry points” in the Dialplan Injection module instructions - you will note that several lines there include math operations.