the only thing I might add is that the conversion from utc to local time only needs to be done if and when the hour changes , its not needed in every loop.
a flag can be set when the utc hour now is != current utc hour , then the flag can be cleared when the conversion is done