docs: def datetime_trunc_sql(self, lookup_type, field_name, tzname):
          """
          Given a lookup_type of 'year', 'month', 'day', 'hour', 'minute' or
          'second', returns the SQL that truncates the given datetime field
          field_name to a datetime object with only the given specificity, and
          a tuple of parameters.
          """
          field_name = self._switch_tz_offset_sql(field_name, tzname)
          reference_date = '0' # 1900-01-01
          if lookup_type in ['minute', 'second']:
              # Prevent DATEDIFF overflow by using the first day of the year as
              # the reference point. Only using for minute and second to avoid any
              # potential performance hit for queries against very large datasets.
              reference_date = "CONVERT(datetime2, CONVERT(char(4), {field_name}, 112) + '0101', 112)".format(
                  field_name=field_name,
              )
          sql = "DATEADD({lookup}, DATEDIFF({lookup}, {reference_date}, {field_name}), {reference_date})".format(
              lookup=lookup_type,
              field_name=field_name,
              reference_date=reference_date,
          )
          return sql, []