fixed the datetime refresh issue