MCPcopy Index your code
hub / github.com/cli/cli / date

Function date

script/build.go:136–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134}
135
136func date() string {
137 t := time.Now()
138 if sourceDate := os.Getenv("SOURCE_DATE_EPOCH"); sourceDate != "" {
139 if sec, err := strconv.ParseInt(sourceDate, 10, 64); err == nil {
140 t = time.Unix(sec, 0)
141 }
142 }
143 return t.Format("2006-01-02")
144}
145
146func sourceFilesLaterThan(t time.Time) bool {
147 foundLater := false

Callers 1

build.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected