code: func (b *builtinTimeFormatSig) formatTime(ctx sessionctx.Context, t types.Duration, formatMask string) (res string, err error) {
  	t2 := types.Time{
  		Time: types.FromDate(0, 0, 0, t.Hour(), t.Minute(), t.Second(), t.MicroSecond()),
  		Type: mysql.TypeDate, Fsp: 0}
  
  	str, err := t2.DateFormat(formatMask)
  	return str, err
  }
docs: // formatTime see https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_time-format