diff --git a/pyQuARC/code/datetime_validator.py b/pyQuARC/code/datetime_validator.py index fd67e4ef..e7b218dc 100644 --- a/pyQuARC/code/datetime_validator.py +++ b/pyQuARC/code/datetime_validator.py @@ -28,6 +28,7 @@ def _iso_datetime(datetime_string): """ REGEX = r"^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$" match_iso8601 = re.compile(REGEX).match + datetime_string = datetime_string.split('.')[0] try: if match_iso8601(datetime_string): if datetime_string.endswith("Z"):