MCPcopy Create free account
hub / github.com/cli/cli / date

Function date

script/build.go:162–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160}
161
162func date() string {
163 t := time.Now()
164 if sourceDate := os.Getenv("SOURCE_DATE_EPOCH"); sourceDate != "" {
165 if sec, err := strconv.ParseInt(sourceDate, 10, 64); err == nil {
166 t = time.Unix(sec, 0)
167 }
168 }
169 return t.Format("2006-01-02")
170}
171
172func sourceFilesLaterThan(t time.Time) bool {
173 foundLater := false

Callers 1

build.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected