Add parseTime fn and test