refactor datetime test