fix time and sorting issue on csv export