diff --git a/metabolights_utils/provider/submission_repository.py b/metabolights_utils/provider/submission_repository.py index fd9d4d9..e06a443 100644 --- a/metabolights_utils/provider/submission_repository.py +++ b/metabolights_utils/provider/submission_repository.py @@ -635,7 +635,12 @@ def download_submission_metadata_files( url = self.rest_api_base_url.strip("/") + "/" + sub_path.strip("/") try: _time = descriptors[filename].created_at - modified = parser.parse(_time).timestamp() + try: + modified = datetime.datetime.strptime( + _time, "%Y-%m-%d %H:%M:%S" + ).timestamp() + except ValueError: + modified = 0 remote_modified_time = int(modified) except Exception: remote_modified_time = None