Skip to content

Commit

Permalink
SOURCE_DATE_EPOCH: drop timezone
Browse files Browse the repository at this point in the history
The timezone information is not exposed to the uint64 representation,
but exposed to RFC3339 representation.

Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Jan 31, 2023
1 parent 9b28f40 commit 5849ab1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exporter/util/epoch/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ func parseTime(key, value string) (*time.Time, error) {
if err != nil {
return nil, errors.Wrapf(err, "invalid %s: %s", key, err)
}
tm := time.Unix(sde, 0)
tm := time.Unix(sde, 0).UTC()
return &tm, nil
}
2 changes: 1 addition & 1 deletion frontend/dockerfile/builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,6 @@ func parseSourceDateEpoch(v string) (*time.Time, error) {
if err != nil {
return nil, errors.Wrapf(err, "invalid SOURCE_DATE_EPOCH: %s", v)
}
tm := time.Unix(sde, 0)
tm := time.Unix(sde, 0).UTC()
return &tm, nil
}

0 comments on commit 5849ab1

Please sign in to comment.