diff --git a/client/app/scripts/components/node-details/node-details-table.js b/client/app/scripts/components/node-details/node-details-table.js index 1f07d45a7e..0b1f4094ab 100644 --- a/client/app/scripts/components/node-details/node-details-table.js +++ b/client/app/scripts/components/node-details/node-details-table.js @@ -30,7 +30,7 @@ const XS_LABEL = { const COLUMN_WIDTHS = { count: CW.XS, container: CW.XS, - docker_container_created: CW.XL, + docker_container_created: CW.XXL, docker_container_restart_count: CW.M, docker_container_state_human: CW.XXL, docker_container_uptime: '85px', diff --git a/probe/docker/container.go b/probe/docker/container.go index a373d5b163..ca11c3883d 100644 --- a/probe/docker/container.go +++ b/probe/docker/container.go @@ -372,7 +372,7 @@ func (c *container) env() map[string]string { func (c *container) getBaseNode() report.Node { result := report.MakeNodeWith(report.MakeContainerNodeID(c.ID()), map[string]string{ ContainerID: c.ID(), - ContainerCreated: c.container.Created.Format(time.RFC822), + ContainerCreated: c.container.Created.Format(time.RFC3339Nano), ContainerCommand: c.container.Path + " " + strings.Join(c.container.Args, " "), ImageID: c.Image(), ContainerHostname: c.Hostname(), diff --git a/probe/docker/container_test.go b/probe/docker/container_test.go index 6d5428755d..7a15f78229 100644 --- a/probe/docker/container_test.go +++ b/probe/docker/container_test.go @@ -70,7 +70,7 @@ func TestContainer(t *testing.T) { } want := report.MakeNodeWith("ping;", map[string]string{ "docker_container_command": " ", - "docker_container_created": "01 Jan 01 00:00 UTC", + "docker_container_created": "0001-01-01T00:00:00Z", "docker_container_id": "ping", "docker_container_name": "pong", "docker_image_id": "baz", diff --git a/probe/kubernetes/meta.go b/probe/kubernetes/meta.go index 4f56f39e18..d8109867e6 100644 --- a/probe/kubernetes/meta.go +++ b/probe/kubernetes/meta.go @@ -43,7 +43,7 @@ func (m meta) Namespace() string { } func (m meta) Created() string { - return m.ObjectMeta.CreationTimestamp.Format(time.RFC822) + return m.ObjectMeta.CreationTimestamp.Format(time.RFC3339Nano) } func (m meta) Labels() map[string]string { diff --git a/probe/kubernetes/reporter_test.go b/probe/kubernetes/reporter_test.go index ad4d5c8b08..8d5117616e 100644 --- a/probe/kubernetes/reporter_test.go +++ b/probe/kubernetes/reporter_test.go @@ -202,7 +202,7 @@ func TestReporter(t *testing.T) { {pod2ID, serviceID, map[string]string{ kubernetes.Name: "pong-b", kubernetes.Namespace: "ping", - kubernetes.Created: pod1.Created(), + kubernetes.Created: pod2.Created(), }}, } { node, ok := rpt.Pod.Nodes[pod.id] @@ -231,7 +231,7 @@ func TestReporter(t *testing.T) { for k, want := range map[string]string{ kubernetes.Name: "pongservice", kubernetes.Namespace: "ping", - kubernetes.Created: pod1.Created(), + kubernetes.Created: service1.Created(), } { if have, ok := node.Latest.Lookup(k); !ok || have != want { t.Errorf("Expected service %s latest %q: %q, got %q", serviceID, k, want, have)