improve datetime converter