Skip to content

Commit 5849ab1

Browse files
committed
SOURCE_DATE_EPOCH: drop timezone
The timezone information is not exposed to the uint64 representation, but exposed to RFC3339 representation. Signed-off-by: Akihiro Suda <[email protected]>
1 parent 9b28f40 commit 5849ab1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exporter/util/epoch/parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ func parseTime(key, value string) (*time.Time, error) {
6060
if err != nil {
6161
return nil, errors.Wrapf(err, "invalid %s: %s", key, err)
6262
}
63-
tm := time.Unix(sde, 0)
63+
tm := time.Unix(sde, 0).UTC()
6464
return &tm, nil
6565
}

frontend/dockerfile/builder/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,6 @@ func parseSourceDateEpoch(v string) (*time.Time, error) {
11311131
if err != nil {
11321132
return nil, errors.Wrapf(err, "invalid SOURCE_DATE_EPOCH: %s", v)
11331133
}
1134-
tm := time.Unix(sde, 0)
1134+
tm := time.Unix(sde, 0).UTC()
11351135
return &tm, nil
11361136
}

0 commit comments

Comments
 (0)