How can I deal with circular features like hours?
The question was already posted, you can find the answer there :

What is a good way to transform Cyclic Ordinal attributes?

The idea is to transform your time feature into two feature : it's like if you represent the hour as the angle of the hand on the clock, and use the sin/cos of the angle as your features