// StrictTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter
// or error on first invalid input.
974321
func (k *Key) StrictTimes(delim string) ([]time.Time, error) {
	return k.StrictTimesFormat(time.RFC3339, delim)
}
850472
func ParseTime(s string) (t time.Time, err error) {
	formats := []string{rssDate, rssDateV1, rssDateV2, rssDateV3, rssDateV4, time.RFC822, time.RFC822Z}
	for _, format := range formats {
		t, err = time.Parse(format, s)
		if err == nil {
			return
		}
	}
	return
}
205437
func (r *Request) Times(num int) *Request {
	r.Counter = num
	return r
}
351536
func tokenConstraintTime(value ast.Value, constraints *tokenConstraints) (err error) {
	var time ast.Number
	var ok bool
	if time, ok = value.(ast.Number); !ok {
		err = fmt.Errorf("token time constraint: must be a number")
		return
	}
	var timeFloat float64
	if timeFloat, err = strconv.ParseFloat(string(time), 64); err != nil {
		err = fmt.Errorf("token time constraint: %v", err)
		return
	}
	if timeFloat < 0 {
		err = fmt.Errorf("token time constraint: must not be negative")
		return
	}
	constraints.time = int64(timeFloat)
	return
}
1179240
func (k *Key) StrictUints(delim string) ([]uint, error) {
	return k.parseUints(k.Strings(delim), false, true)
}
585664
func (r *queryTable) Times(j int) *array.Int64 {
	return r.cols[j].(*array.Int64)
}
429556
func (k *Key) StrictTimesFormat(format, delim string) ([]time.Time, error) {
	return k.parseTimesFormat(format, k.Strings(delim), false, true)
}
946030
func (c *Client) Chtimes(path string, atime time.Time, mtime time.Time) error {
	type times struct {
		Atime uint32
		Mtime uint32
	}
	attrs := times{uint32(atime.Unix()), uint32(mtime.Unix())}
	return c.setstat(path, ssh_FILEXFER_ATTR_ACMODTIME, attrs)
}
170923
func (is *Is) Strict() *Is {
	return &Is{
		TB:         is.TB,
		strict:     true,
		failFormat: is.failFormat,
		failArgs:   is.failArgs,
	}
}
827443
func getTime(v interface{}) time.Time {
	sval, ok := v.(string)
	if !ok {
		return time.Time{}
	}
	t, err := time.Parse(time.RFC3339, sval)
	if err != nil {
		return time.Time{}
	}
	return t
}
567239
func (t Result) Time() time.Time {
	res, _ := time.Parse(time.RFC3339, t.String())
	return res
}
82831
func ParseDatetime(str string) (Time, error) {
	return ParseTime(str, mysql.TypeDatetime, DefaultFsp)
}
1295480
func ParseDateTime(val string) time.Time {
	t, err := time.Parse(DateTimeFormat, val)
	if err != nil {
		return time.Time{}
	}

	return t
}
963088
func parseTime(t string) (time.Time, error) {
	for _, tf := range timeFormats {
		time, err := time.Parse(tf, t)
		if err == nil {
			log.Debug("timeparse: found format", tf)
			return time, nil
		}
	}
	return time.Time{}, ErrInvalidTimeFormat
}
1021641
func (c *Client) TimeZones() ([]*models.TimeZone, error) {
	var err error
	var result []*models.TimeZone

	data, err := httpGet(geonamesURL + timeZonesURL)
	if err != nil {
		return nil, err
	}

	parse(data, 1, func(raw [][]byte) bool {
		if len(raw) != 5 {
			return true
		}

		gmtOffset, _ := strconv.ParseFloat(string(raw[2]), 64)
		dstOffset, _ := strconv.ParseFloat(string(raw[3]), 64)
		rawOffset, _ := strconv.ParseFloat(string(raw[4]), 64)

		result = append(result, &models.TimeZone{
			CountryIso2Code: string(raw[0]),
			TimeZoneID:      string(raw[1]),
			GmtOffset:       time.Duration(gmtOffset) * time.Hour,
			DstOffset:       time.Duration(dstOffset) * time.Hour,
			RawOffset:       time.Duration(rawOffset) * time.Hour,
		})

		return true
	})

	return result, nil
}
520028
func (k *Key) ValidTimes(delim string) []time.Time {
	return k.ValidTimesFormat(time.RFC3339, delim)
}
11156
func (ce *CronEntry) Times(theTime time.Time) []TimeSectionMap {
	return []TimeSectionMap{
		TimeSectionMap{
			Time:    theTime.Minute(),
			Section: ce.Minute,
		},
		TimeSectionMap{
			Time:    theTime.Hour(),
			Section: ce.Hour,
		},
		TimeSectionMap{
			Time:    theTime.Day(),
			Section: ce.Day,
		},
		TimeSectionMap{
			Time:    int(theTime.Month()),
			Section: ce.Month,
		},
		TimeSectionMap{
			Time:    int(theTime.Weekday()),
			Section: ce.DayOfWeek,
		},
	}
}