fix time parsing
add tests for time