From 0d60114af342ee58d44d105022472936ec5da748 Mon Sep 17 00:00:00 2001 From: Apostolis Stergiou Date: Mon, 16 Apr 2018 10:59:03 +0300 Subject: [PATCH] fixup! work: Add start time to build result --- types/build_result.go | 3 ++- worker.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/build_result.go b/types/build_result.go index ce57910..1d89de9 100644 --- a/types/build_result.go +++ b/types/build_result.go @@ -2,6 +2,7 @@ package types import ( "fmt" + "time" ) type BuildResult struct { @@ -25,7 +26,7 @@ type BuildResult struct { TransportMethod TransportMethod // The job's start time - StartTime string + StartTime time.Time } type ErrImageBuild struct { diff --git a/worker.go b/worker.go index 4bfb6c0..f578320 100644 --- a/worker.go +++ b/worker.go @@ -25,7 +25,7 @@ func (s *Server) Work(ctx context.Context, j *Job) (buildResult *types.BuildResu buildResult = &types.BuildResult{ Path: filepath.Join(j.ReadyBuildPath, DataDir, ArtifactsDir), TransportMethod: types.Rsync, - StartTime: time.Now().Local().Format("01/02/2006 15:04:05"), + StartTime: time.Now().Local(), } _, err = os.Stat(j.ReadyBuildPath)