Fix parsing time string