[SOLVED] DateTime.interfaces.SyntaxError: Unable to parse when updating security settings

On a Plone 6 site (migrated using json import/export), I'm getting the following error when attempting to update security settings under portal_worflow:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 173, in transaction_pubevents
  Module transaction._manager, line 257, in commit
  Module transaction._manager, line 134, in commit
  Module transaction._transaction, line 267, in commit
  Module transaction._transaction, line 333, in _callBeforeCommitHooks
  Module transaction._transaction, line 372, in _call_hooks
  Module Products.CMFCore.indexing, line 317, in before_commit
  Module Products.CMFCore.indexing, line 227, in process
  Module Products.CMFCore.indexing, line 49, in reindex
  Module Products.CMFCore.CatalogTool, line 368, in _reindexObject
  Module Products.CMFPlone.CatalogTool, line 324, in catalog_object
  Module Products.ZCatalog.ZCatalog, line 507, in catalog_object
  Module Products.ZCatalog.Catalog, line 347, in catalogObject
  Module Products.ZCatalog.Catalog, line 292, in updateMetadata
  Module Products.ZCatalog.Catalog, line 427, in recordify
  Module plone.dexterity.content, line 524, in Date
  Module plone.dexterity.utils, line 212, in datify
  Module DateTime.DateTime, line 451, in __init__
DateTime.interfaces.SyntaxError: Unable to parse ((DateTime('2021/06/23 13:25:00 UTC'),),), {}

I've seen something like this before. I thought it was due to a discrepancy between Python datetime and Zope DateTime but it looks more like something not being properly stored as a DateTime object.

I don't know enough yet to troubleshoot.

I'm getting this exact same problem. It happens when I'm trying to modify the workflow (in the same way that David identified).

Found the problem.
We had a custom content type which is only ever added using the Plone API. The code that adds the custom content type creates content with badly formatted dates. The problem was resolved by deleting all instances of that auto-generated content type from the site.