time utils logic