Skip to content

Commit

Permalink
Dates to UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
nlewo committed Jun 9, 2024
1 parent 258d627 commit b46f0ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ func (d Deployment) Deploy(ctx context.Context) Deployment {
logrus.Infof("Deployment failed")
}

deploymentResult.EndAt = time.Now()
deploymentResult.EndAt = time.Now().UTC()
deploymentResult.RestartComin = cominNeedRestart
d.deploymentCh <- deploymentResult
}()
d.Status = Running
d.StartAt = time.Now()
d.StartAt = time.Now().UTC()
return d
}
8 changes: 4 additions & 4 deletions internal/generation/generation.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ func (g Generation) UpdateBuild(r BuildResult) Generation {

func (g Generation) Eval(ctx context.Context) Generation {
g.evalCh = make(chan EvalResult)
g.EvalStartedAt = time.Now()
g.EvalStartedAt = time.Now().UTC()
g.Status = Evaluating

fn := func() {
ctx, cancel := context.WithTimeout(ctx, g.evalTimeout)
defer cancel()
drvPath, outPath, machineId, err := g.evalFunc(ctx, g.FlakeUrl, g.Hostname)
evaluationResult := EvalResult{
EndAt: time.Now(),
EndAt: time.Now().UTC(),
}
if err == nil {
evaluationResult.DrvPath = drvPath
Expand All @@ -196,14 +196,14 @@ func (g Generation) Eval(ctx context.Context) Generation {

func (g Generation) Build(ctx context.Context) Generation {
g.buildCh = make(chan BuildResult)
g.BuildStartedAt = time.Now()
g.BuildStartedAt = time.Now().UTC()
g.Status = Building
fn := func() {
ctx, cancel := context.WithTimeout(ctx, g.evalTimeout)
defer cancel()
err := g.buildFunc(ctx, g.DrvPath)
buildResult := BuildResult{
EndAt: time.Now(),
EndAt: time.Now().UTC(),
}
buildResult.Err = err
g.buildCh <- buildResult
Expand Down
2 changes: 1 addition & 1 deletion internal/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (r *repository) Fetch(remoteName string) (err error) {
repositoryStatusRemote.FetchErrorMsg = ""
repositoryStatusRemote.Fetched = true
}
repositoryStatusRemote.FetchedAt = time.Now()
repositoryStatusRemote.FetchedAt = time.Now().UTC()
}
return
}
Expand Down

0 comments on commit b46f0ab

Please sign in to comment.