          sql = self.date_extract_sql(lookup_type, field_name)
          return sql, params
  
      def datetime_trunc_sql(self, lookup_type, field_name, tzname):
          field_name, params = self._convert_field_to_tz(field_name, tzname)
          fields = ['year', 'month', 'day', 'hour', 'minute', 'second']
          format = ('%%Y-', '%%m', '-%%d', ' %%H:', '%%i', ':%%s')  # Use double percents to escape.
          format_def = ('0000-', '01', '-01', ' 00:', '00', ':00')
          try:
              i = fields.index(lookup_type) + 1
 
</s> remove         field_name, params = self._convert_field_to_tz(field_name, tzname)
        sql = self.date_extract_sql(lookup_type, field_name)
        return sql, params
 </s> add         field_name = self._convert_field_to_tz(field_name, tzname)
        return self.date_extract_sql(lookup_type, field_name) </s> remove         field_name, params = self._convert_field_to_tz(field_name, tzname)
        sql = self.date_extract_sql(lookup_type, field_name)
        return sql, params
 </s> add         field_name = self._convert_field_to_tz(field_name, tzname)
        return self.date_extract_sql(lookup_type, field_name) </s> remove         field_name, params = self._convert_field_to_tz(field_name, tzname)
 </s> add         field_name = self._convert_field_to_tz(field_name, tzname) </s> remove         field_name, params = self._convert_field_to_tz(field_name, tzname)
        sql = "TIME(%s)" % field_name
        return sql, params
 </s> add         field_name = self._convert_field_to_tz(field_name, tzname)
        return "TIME(%s)" % field_name </s> remove         field_name, params = self._convert_field_to_tz(field_name, tzname)
        sql = '(%s)::time' % field_name
        return sql, params
 </s> add         field_name = self._convert_field_to_tz(field_name, tzname)
        return '(%s)::time' % field_name
        field_name = self._convert_field_to_tz(field_name, tzname)
          sql = self.date_extract_sql(lookup_type, field_name)
          return sql, params
  
      def datetime_trunc_sql(self, lookup_type, field_name, tzname):
        field_name = self._convert_field_to_tz(field_name, tzname)
          fields = ['year', 'month', 'day', 'hour', 'minute', 'second']
          format = ('%%Y-', '%%m', '-%%d', ' %%H:', '%%i', ':%%s')  # Use double percents to escape.
          format_def = ('0000-', '01', '-01', ' 00:', '00', ':00')
          try:
              i = fields.index(lookup_type) + 1
keep keep keep keep replace keep keep keep keep keep
 Fixed #27802 -- Unified return value of db backend datetime SQL methods. 
django/db/backends/mysql/operations.py