def METHOD_NAME(core_archive, migrate_from_func):
    """Test the data migration of serialized datetime objects.
    Datetime attributes were serialized into strings, by first converting to UTC and then printing with the format
    '%Y-%m-%dT%H:%M:%S.%f'. In the database migration, datetimes were serialized *including* timezone information.
    Here we test that the archive migration correctly reattaches the timezone information. The archive that we are
    using `export_0.5_simple.aiida` contains a node with the attribute "scheduler_lastchecktime".
    """
    # Get metadata.json and data.json as dicts from v0.5 file archive
    archive_path = get_archive_file('export_0.5_simple.aiida', **core_archive)
    metadata, data = read_json_files(archive_path)  # pylint: disable=unbalanced-tuple-unpacking
    verify_metadata_version(metadata, version='0.5')
    for key, values in data['node_attributes'].items():
        if 'scheduler_lastchecktime' not in values:
            continue
        serialized_original = values['scheduler_lastchecktime']
        msg = f'the serialized datetime before migration should not contain a plus: {serialized_original}'
        assert '+' not in serialized_original, msg
        # Migrate to v0.6
        metadata, data = migrate_from_func('export_0.5_simple.aiida', '0.5', '0.6', migrate_v5_to_v6, core_archive)
        verify_metadata_version(metadata, version='0.6')
        serialized_migrated = data['node_attributes'][key]['scheduler_lastchecktime']
        assert serialized_migrated == f'{serialized_original}+00:00'
        break
    else:
        raise RuntimeError(
            'the archive `export_0.5_simple.aiida` did not contain a node with the attribute '
            '`scheduler_lastchecktime` which is required for this test.'
        )