Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Commit

Permalink
use UTC time, except when rendering text output
Browse files Browse the repository at this point in the history
Signed-off-by: Achille Roussel <[email protected]>
  • Loading branch information
achille-roussel committed May 29, 2023
1 parent 74aa256 commit e024a61
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func describeProcess(ctx context.Context, reg *timemachine.Registry, id string)

desc := &processDescriptor{
id: processID,
startTime: human.Time(p.StartTime),
startTime: human.Time(p.StartTime.In(time.Local)),
runtime: runtimeDescriptor{
runtime: runtime,
version: version,
Expand All @@ -240,7 +240,7 @@ func describeProcess(ctx context.Context, reg *timemachine.Registry, id string)
desc.log = append(desc.log, logSegment{
number: v.Number,
size: human.Bytes(v.Size),
createdAt: human.Time(v.CreatedAt),
createdAt: human.Time(v.CreatedAt.In(time.Local)),
})
}
if err := i.Err(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func run(ctx context.Context, args []string) error {
}

processID := uuid.New()
startTime := time.Now()
startTime := time.Now().UTC()

module, err := registry.CreateModule(ctx, &format.Module{
Code: wasmCode,
Expand Down
2 changes: 1 addition & 1 deletion internal/object/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ func (r *dirReader) Read(items []Info) (n int, err error) {
items[n] = Info{
Name: path.Join(r.path, name),
Size: info.Size(),
CreatedAt: info.ModTime(),
CreatedAt: info.ModTime().UTC(),
Tags: tags,
}

Expand Down

0 comments on commit e024a61

Please sign in to comment.