
**Apache Airflow version**:

master

**What happened**:

https://github.com/apache/airflow/blob/master/airflow/models/baseoperator.py#L356 --> should be timedelta not datetime


airflow/serialization/serialized_objects.py
elif isinstance(var, cls._datetime_types):
            return cls._encode(var.timestamp(), type_=DAT.DATETIME)
        elif isinstance(var, datetime.timedelta):
            return cls._encode(var.total_seconds(), type_=DAT.TIMEDELTA)
        elif isinstance(var, Timezone):
            return cls._encode(str(var.name), type_=DAT.TIMEZONE)
        elif isinstance(var, relativedelta.relativedelta):
            encoded = {k: v for k, v in var.__dict__.items() if not k.startswith("_") and v}
            if var.weekday and var.weekday.n:
                
                encoded['weekday'] = [var.weekday.weekday, var.weekday.n]
            elif var.weekday:
                encoded['weekday'] = [var.weekday.weekday]
            return cls._encode(encoded, type_=DAT.RELATIVEDELTA)
        elif callable(var):
            return str(get_python_source(var))
        elif isinstance(var, set):
            
            return cls._encode([cls._serialize(v) for v in var], type_=DAT.SET)
        elif isinstance(var, tuple):
            
            return cls._encode([cls._serialize(v) for v in var], type_=DAT.TUPLE)
        elif isinstance(var, TaskGroup):
            return SerializedTaskGroup.serialize_task_group(var)
        else:
            log.debug('Cast type %s to str in serialization.', type(var))
            return str(var)
    
    @classmethod
    def _deserialize(cls, encoded_var: Any) -> Any: