//echo -a $asctime($calc($gmt - (5 * 3600)))

You need to use $calc whenever you're doing a calculation. Also, because the times are based on seconds, you need to multiply it by 3600 (60 seconds in a minute, 60 minutes in an hour) to get it to be the right amount to subtract. You can just change the 5 to anything else in this and it will give you the correct time. And change the - to a + if you need to go the other way.