code: func (d Duration) ConvertToTime(sc *stmtctx.StatementContext, tp uint8) (Time, error) {
  	year, month, day := gotime.Now().In(sc.TimeZone).Date()
  	sign, hour, minute, second, frac := splitDuration(d.Duration)
  	datePart := FromDate(year, int(month), day, 0, 0, 0, 0)
  	timePart := FromDate(0, 0, 0, hour, minute, second, frac)
  	mixDateAndTime(&datePart, &timePart, sign < 0)
  
  	t := Time{
  		Time: datePart,
  		Type: mysql.TypeDatetime,
  		Fsp:  d.Fsp,
  	}
  	return t.Convert(sc, tp)
  }
docs: // ConvertToTime converts duration to Time.
  // Tp is TypeDatetime, TypeTimestamp and TypeDate.