diff --git a/swh/deposit/tests/api/test_checks.py b/swh/deposit/tests/api/test_checks.py
--- a/swh/deposit/tests/api/test_checks.py
+++ b/swh/deposit/tests/api/test_checks.py
@@ -81,6 +81,23 @@
no one
2020-12-21
2020-12-21
+ 2020-12-25
+ {PROVENANCE_XML}
+
+ """,
+ ),
+ (
+ # technically, only Date is allowed for datePublished; but we allow DateTime
+ # for backward compatibility with old swh-deposit versions
+ f"""\
+
+ some url
+ some id
+ nar
+ no one
+ 2020-12-21T12:00:00
+ 2020-12-21T12:00:00
+ 2020-12-25T12:00:00
{PROVENANCE_XML}
""",
@@ -314,6 +331,23 @@
},
],
),
+ (
+ f"""\
+
+ some url
+ someid
+ bar
+ no one
+ 2020-12-aa
+
+ """,
+ [
+ {
+ "summary": ".*Reason: invalid value '2020-12-aa'.*",
+ "fields": ["codemeta:dateModified"],
+ },
+ ],
+ ),
(
f"""\
diff --git a/swh/deposit/xsd/codemeta.xsd b/swh/deposit/xsd/codemeta.xsd
--- a/swh/deposit/xsd/codemeta.xsd
+++ b/swh/deposit/xsd/codemeta.xsd
@@ -7,8 +7,11 @@
+
+