MCPcopy
hub / github.com/moby/moby / daemonUnixTime

Function daemonUnixTime

integration-cli/docker_utils_test.go:214–218  ·  view source on GitHub ↗

daemonUnixTime returns the current time on the daemon host with nanoseconds precision. It return the time formatted how the client sends timestamps to the server.

(t *testing.T)

Source from the content-addressed store, hash-verified

212// daemonUnixTime returns the current time on the daemon host with nanoseconds precision.
213// It return the time formatted how the client sends timestamps to the server.
214func daemonUnixTime(t *testing.T) string {
215 t.Helper()
216 dt := daemonTime(t)
217 return fmt.Sprintf("%d.%09d", dt.Unix(), int64(dt.Nanosecond()))
218}
219
220// appendBaseEnv appends the minimum set of environment variables to exec the
221// docker cli binary for testing with correct configuration to the given env

Calls 2

daemonTimeFunction · 0.85
HelperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…