robustify time detection/handling