fix time NaN in ie & safari