PHP Change CSS Stylesheet Based On Tiime Of Day


PHP Change CSS Stylesheet Based On Time Of Day

<?php
date_default_timezone_set('America/Los_Angeles');
$time = date('H');

if($time >= 00 AND $time <= 12){
//am
$my_style = 'style.css';
}

else if($time > 12 AND $time <= 24){
//pm
$my_style = 'style_night.css';
}
?>
<link rel="stylesheet" type="text/css" href="<?php echo $my_style; ?>" />