time parser refacoring