hour - based context
If you are adding classes which will be styled by your theme then it is best to add them with the theme in template.php. Each theme might handle this differently.

For example, if your theme is based on Fusion then you can add new classes by implementing hook_core_preprocess_html()

&lt;?php
function mytheme_core_preprocess_html(&amp;$vars) {
    $vars['classes_array'][] = mytheme_hour_based_class();
}

function mytheme_hour_based_class() {
    // Return a CSS class based on the current 24 hour time
    return 'hour-of-day-'. date('H');
}
?&gt;


If there isn't an existing context module which serves your purpose then you would have to create your own module which implements the context API. You can learn about the context API here.

http://drupalcontrib.org/api/drupal/contributions!context!context.api.php/7

Telling you how to do that would essentially require writing the module for you, which seems outside the scope of an answer.