diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index 3ee257b..6d79a1e 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -18,7 +18,7 @@ JSON_TYPE_TO_PYTHON_TYPE = {
 class CodeGeneratorDraft04(CodeGenerator):
     # pylint: disable=line-too-long
     FORMAT_REGEXS = {
-        'date-time': r'^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)?$',
+        'date-time': r'^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$',
         'email': r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$',
         'hostname': (
             r'^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*'

JsonSchemaException when using date-time with RFC 3339 compliant string
Validation fails with this example:

```
import json

import fastjsonschema

schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://example.com/example.schema.json",
    "title": "Example",
    "description": "An example schema",
    "type": "object",
    "properties": {
        "date": {
            "type": "string",
            "description": "Some date",
            "format": "date-time"
        }   
    }
}

validate = fastjsonschema.compile(schema)

validate({"date": "2018-02-05T14:17:10Z"})
```

The output is:

```
Traceback (most recent call last):
  File "validate_simple_example.py", line 22, in <module>
    validate({"date": "2018-02-05T14:17:10Z"})
  File "<string>", line 16, in validate_https___example_com_example_schema_json
fastjsonschema.exceptions.JsonSchemaException
```

According to the [json schema docs](http://json-schema.org/latest/json-schema-validation.html#rfc.section.7.3.1) all RFC 3339 timestamps should be valid.

I think the problem is the milliseconds part. It should be optional if I'm not wrong.

The above example runs fine with: `validate({"date": "2018-02-05T14:17:10.00Z"})`

The current regex is:

```
^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)?$
```

I suggest changing it to:

```
^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$
```

Also maybe it's worth thinking about not using regexes for format validation for some of the stuff (like ips, dates, etc.)
diff --git a/tests/test_datetime.py b/tests/test_datetime.py
new file mode 100644
index 0000000..2263e9f
--- /dev/null
+++ b/tests/test_datetime.py
@@ -0,0 +1,15 @@
+
+import pytest
+
+from fastjsonschema import JsonSchemaException
+
+
+exc = JsonSchemaException('data must be date-time')
+@pytest.mark.parametrize('value, expected', [
+    ('', exc),
+    ('bla', exc),
+    ('2018-02-05T14:17:10.00Z', '2018-02-05T14:17:10.00Z'),
+    ('2018-02-05T14:17:10Z', '2018-02-05T14:17:10Z'),
+])
+def test_datetime(asserter, value, expected):
+    asserter({'type': 'string', 'format': 'date-time'}, value, expected)

pip install -e .[devel]
parse_log_pytest
requirements.txt
pytest pytest-benchmark pytest-cache
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astroid==3.3.9
attrs==25.3.0
certifi==2025.1.31
charset-normalizer==3.4.1
colorama==0.4.6
dill==0.3.9
exceptiongroup==1.2.2
execnet==2.1.1
-e git+https://github.com/horejsek/python-fastjsonschema.git@dc3ae94332ce901181120db8a2f9f8b6d5339622#egg=fastjsonschema
idna==3.10
iniconfig==2.1.0
isort==6.0.1
json-spec==0.10.1
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
mccabe==0.7.0
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
py-cpuinfo==9.0.0
pylint==3.3.6
pytest==8.3.5
pytest-benchmark==5.1.0
pytest-cache==1.0
referencing==0.36.2
requests==2.32.3
rpds-py==0.24.0
six==1.17.0
tomli==2.2.1
tomlkit==0.13.2
typing_extensions==4.13.0
urllib3==2.3.0
validictory==1.1.3

name: python-fastjsonschema
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astroid==3.3.9
      - attrs==25.3.0
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - colorama==0.4.6
      - dill==0.3.9
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - idna==3.10
      - iniconfig==2.1.0
      - isort==6.0.1
      - json-spec==0.10.1
      - jsonschema==4.23.0
      - jsonschema-specifications==2024.10.1
      - mccabe==0.7.0
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - py-cpuinfo==9.0.0
      - pylint==3.3.6
      - pytest==8.3.5
      - pytest-benchmark==5.1.0
      - pytest-cache==1.0
      - referencing==0.36.2
      - requests==2.32.3
      - rpds-py==0.24.0
      - six==1.17.0
      - tomli==2.2.1
      - tomlkit==0.13.2
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - validictory==1.1.3
prefix: /opt/conda/envs/python-fastjsonschema

tests/test_datetime.py::test_datetime[2018-02-05T14:17:10Z-2018-02-05T14:17:10Z]
tests/test_datetime.py::test_datetime[-expected0] tests/test_datetime.py::test_datetime[bla-expected1] tests/test_datetime.py::test_datetime[2018-02-05T14:17:10.00Z-2018-02-05T14:17:10.00Z]
fastjsonschema/draft04.py
fastjsonschema/draft04.py