Give this a try.
By using the function date with a param of "G", you are asigning a "24-hour format of an hour without leading zeros". The only kicker is, this is the server time, which may not be your local time. If you server is in another timezone, you may have to adjust the 6 and 12 above.
Hope that helps. And sorry for the style change. I'm a bugger like that.