// Overrides the time of the Entry.
184399
func (entry *Entry) WithTime(t time.Time) *Entry {
	return &Entry{Logger: entry.Logger, Data: entry.Data, Time: t, err: entry.err, Context: entry.Context}
}
1054586
func (r *Redis) Time() ([]string, error) {
	rp, err := r.ExecuteCommand("TIME")
	if err != nil {
		return nil, err
	}
	return rp.ListValue()
}
1036994
func (f *FakeClock) SetTime(t time.Time) {
	f.lock.Lock()
	defer f.lock.Unlock()
	f.setTimeLocked(t)
}
875342
func Time(from time.Time, maxDelta time.Duration) time.Time {
	globalLk.Lock()
	defer globalLk.Unlock()
	return globalGen.Time(from, maxDelta)
}
173285
func (e *Event) Time(key string, t time.Time) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendTime(enc.AppendKey(e.buf, key), t, TimeFieldFormat)
	return e
}
722587
func Time() gopter.Gen {
	return func(genParams *gopter.GenParameters) *gopter.GenResult {
		sec := genParams.Rng.Int63n(253402214400) // Ensure year in [0, 9999]
		usec := genParams.Rng.Int63n(1000000000)

		return gopter.NewGenResult(time.Unix(sec, usec), TimeShrinker)
	}
}
1315495
func (id *ULID) SetTime(ms uint64) error {
	if ms > maxTime {
		return ErrBigTime
	}

	(*id)[0] = byte(ms >> 40)
	(*id)[1] = byte(ms >> 32)
	(*id)[2] = byte(ms >> 24)
	(*id)[3] = byte(ms >> 16)
	(*id)[4] = byte(ms >> 8)
	(*id)[5] = byte(ms)

	return nil
}
1088036
func (fi *darwinExFileInfo) ATime() time.Time {
	return timespecToTime(fi.Sys().(*syscall.Stat_t).Atimespec)
}
810510
func (c Context) Time(key string, t time.Time) Context {
	c.l.context = enc.AppendTime(enc.AppendKey(c.l.context, key), t, TimeFieldFormat)
	return c
}
1000244
func (m *Machine) OnTimerTick(tickNonce int64) error {
	// Silently skip unexpected, late or canceled ticks. This is fine.
	switch {
	case m.State.IsSuspended():
		return nil
	case m.State.LastTick.TickNonce != tickNonce:
		return nil
	}

	// Report error (to trigger a retry) if the tick happened unexpectedly soon.
	// Allow up to 50ms clock drift, but correct it to be 0. This is important for
	// getting the correct next tick time from an absolute schedule. If we pass
	// m.Now to the cron schedule uncorrected, we'll just get the time of the
	// already scheduled tick (the one we are handling now, since uncorrected
	// m.Now is before it).
	//
	// Note that m.Now is part of inputs and must not be mutated. We propagate
	// the corrected time via the call stack.
	now := m.Now
	switch delay := now.Sub(m.State.LastTick.When); {
	case delay < -50*time.Millisecond:
		return fmt.Errorf("tick happened %s before it was expected", -delay)
	case delay < 0:
		now = m.State.LastTick.When
	}

	// The scheduled time has come!
	m.State.Generation = m.nextGen()
	m.Actions = append(m.Actions, StartInvocationAction{
		Generation: m.State.Generation,
	})
	m.State.LastTick = TickLaterAction{}

	// Start waiting for a new tick right away if on an absolute schedule or just
	// keep the tick state clear for relative schedules: new tick will be set when
	// RewindIfNecessary() is manually called by whoever handles the cron.
	if m.Schedule.IsAbsolute() {
		m.rewindIfNecessary(now)
	}

	return nil
}
716036
func (b *builtinFromUnixTime1ArgSig) evalTime(row chunk.Row) (res types.Time, isNull bool, err error) {
	return evalFromUnixTime(b.ctx, b.tp.Decimal, row, b.args[0])
}
1014025
func (logger *Logger) WithTime(t time.Time) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithTime(t)
}
1353198
func timeToMsDosTime(t time.Time) (fDate uint16, fTime uint16) {
	t = t.In(time.UTC)
	fDate = uint16(t.Day() + int(t.Month())<<5 + (t.Year()-1980)<<9)
	fTime = uint16(t.Second()/2 + t.Minute()<<5 + t.Hour()<<11)
	return
}
1136927
func (fi *darwinExFileInfo) CTime() time.Time {
	return timespecToTime(fi.Sys().(*syscall.Stat_t).Ctimespec)
}
736486
func (dd Date) Time(loc *time.Location) (t time.Time) {
	if !dd.IsZero() {
		t = time.Date(
			int(dd.Year), time.Month(dd.Month), int(dd.Day),
			0, 0, 0, 0,
			loc,
		)
	}
	return
}
934443
func (cli *OpsGenieClient) ScheduleOverride() (*OpsGenieScheduleOverrideClient, error) {
	cli.makeHTTPTransportSettings()

	scheduleOverrideClient := new(OpsGenieScheduleOverrideClient)
	scheduleOverrideClient.SetOpsGenieClient(*cli)

	if cli.opsGenieAPIURL == "" {
		scheduleOverrideClient.SetOpsGenieAPIUrl(endpointURL)
	}

	return scheduleOverrideClient, nil
}
548808
func HandlerAscTime(entry *logrus.Entry, formatter *CustomFormatter) (interface{}, error) {
	return entry.Time.Format(formatter.TimestampFormat), nil
}