refactoring time object parsing