Fix cached time string encoding issue