WS
missing hours variable
$interval_parts should be an int, so compare against null
line-length cleanup