code: func (t *TimeOfDay) toTime() (time.Time, error) {
  	now := time.Time{}
  	loc, err := time.LoadLocation(t.GetLocation())
  	if err != nil {
  		return now, errors.Reason("invalid location").Err()
  	}
  	now = now.In(loc)
  	// Decompose the time into a slice of [time, <hour>, <minute>].
  	m := regexp.MustCompile(timeRegex).FindStringSubmatch(t.GetTime())
  	if len(m) != 3 {
  		return now, errors.Reason("time must match regex %q", timeRegex).Err()
  	}
  	hr, err := strconv.Atoi(m[1])
  	if err != nil || hr > 23 {
  		return now, errors.Reason("time must not exceed 23:xx").Err()
  	}
  	min, err := strconv.Atoi(m[2])
  	if err != nil || min > 59 {
  		return now, errors.Reason("time must not exceed xx:59").Err()
  	}
  	return time.Date(now.Year(), now.Month(), now.Day(), hr, min, 0, 0, loc), nil
  }
docs: // toTime returns the time.Time representation of the time referenced by this
  // time of day.