Fixed day_or_night function.