normalize time ranges