Skip to content

Commit b43d5f3

Browse files
authored
Merge pull request moby#3559 from AkihiroSuda/epoch-utc
SOURCE_DATE_EPOCH: drop timezone
2 parents 75f7c2e + 5849ab1 commit b43d5f3

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)