time utilities refactoring