MCPcopy Create free account
hub / github.com/codnect/chrono / WithTime

Function WithTime

task.go:60–70  ·  view source on GitHub ↗
(t time.Time)

Source from the content-addressed store, hash-verified

58type Option func(task *SchedulerTask) error
59
60func WithTime(t time.Time) Option {
61 return func(task *SchedulerTask) error {
62 task.startTime = time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), 0, time.Local)
63
64 if t.Location() != nil && t.Location() != time.Local {
65 task.location = t.Location()
66 }
67
68 return nil
69 }
70}
71
72// Deprecated: Use WithTime instead.
73func WithStartTime(year int, month time.Month, day, hour, min, sec int) Option {

Calls

no outgoing calls