      def as_sql(self, compiler, connection):
          # Cast to date rather than truncate to date.
          lhs, lhs_params = compiler.compile(self.lhs)
          tzname = timezone.get_current_timezone_name() if settings.USE_TZ else None
          sql, tz_params = connection.ops.datetime_cast_date_sql(lhs, tzname)
          lhs_params.extend(tz_params)
          return sql, lhs_params
  
  
  class TruncTime(TruncBase):
      kind = 'time'
 
</s> remove         sql, tz_params = connection.ops.datetime_cast_time_sql(lhs, tzname)
        lhs_params.extend(tz_params)
 </s> add         sql = connection.ops.datetime_cast_time_sql(lhs, tzname) </s> remove             sql, tz_params = connection.ops.datetime_extract_sql(self.lookup_name, sql, tzname)
            params.extend(tz_params)
 </s> add             sql = connection.ops.datetime_extract_sql(self.lookup_name, sql, tzname) </s> remove         return sql, []
 </s> add         return sql </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) </s> remove         sql = 'TRUNC(%s)' % field_name
        return sql, []
 </s> add         return 'TRUNC(%s)' % field_name
        sql = connection.ops.datetime_cast_date_sql(lhs, tzname)
      def as_sql(self, compiler, connection):
          # Cast to date rather than truncate to date.
          lhs, lhs_params = compiler.compile(self.lhs)
          tzname = timezone.get_current_timezone_name() if settings.USE_TZ else None
        sql = connection.ops.datetime_cast_date_sql(lhs, tzname)
        sql = connection.ops.datetime_cast_date_sql(lhs, tzname)
          return sql, lhs_params
  
  
  class TruncTime(TruncBase):
      kind = 'time'
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #27802 -- Unified return value of db backend datetime SQL methods. 
django/db/models/functions/datetime.py