First you need to have your 2 themes installed and you need to know the id of your theme.
Now open global.php
Find :
Code:
// This user has a custom theme set in their profile
if(isset($mybb->user['style']) && intval($mybb->user['style']) != 0)
{
$loadstyle = "tid='".$mybb->user['style']."'";
}
Below this code add :
Code:
$time = date("H");
if ($time >= 6 && $time < 18 ) {
$loadstyle="tid='".intval(DAY THEME TID)."'";
} else
{
$loadstyle="tid='".intval(NIGHT THEME TID)."'";
}
Change red content by your IDs.
Tested on 1.8.x can work in 1.6.x (surely) :yus: