              sql = connection.ops.time_trunc_sql(self.kind, inner_sql)
              params = []
          else:
              raise ValueError('Trunc only valid on DateField, TimeField, or DateTimeField.')
          return sql, inner_params + params
  
      def resolve_expression(self, query=None, allow_joins=True, reuse=None, summarize=False, for_save=False):
          copy = super().resolve_expression(query, allow_joins, reuse, summarize, for_save)
          field = copy.lhs.output_field
          # DateTimeField is a subclass of DateField so this works for both.
 
</s> remove             params = []
 </s> add  </s> remove             params = []
 </s> add  </s> remove         return sql, params
 </s> add         return sql </s> remove             sql, params = connection.ops.datetime_trunc_sql(self.kind, inner_sql, tzname)
 </s> add             sql = connection.ops.datetime_trunc_sql(self.kind, inner_sql, tzname) </s> remove         field_name = self._convert_field_to_tz(field_name, tzname)
        return field_name, []
 </s> add         return self._convert_field_to_tz(field_name, tzname)
        return sql, inner_params
              sql = connection.ops.time_trunc_sql(self.kind, inner_sql)
              params = []
          else:
              raise ValueError('Trunc only valid on DateField, TimeField, or DateTimeField.')
        return sql, inner_params
  
      def resolve_expression(self, query=None, allow_joins=True, reuse=None, summarize=False, for_save=False):
          copy = super().resolve_expression(query, allow_joins, reuse, summarize, for_save)
          field = copy.lhs.output_field
          # DateTimeField is a subclass of DateField so this works for both.
keep keep keep keep replace keep keep keep keep keep
 Fixed #27802 -- Unified return value of db backend datetime SQL methods. 
django/db/models/functions/datetime.py