1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 11:28:51 +01:00

Fix invalid build timestamp on certain timezones (#15245)

Currently the build .zip has its time set to the Unix epoch, which
apparently causes problems on certain operating systems when in a
timezone that is behind GMT.

The build timestamp has been changed to MetaMask's birthday. Time
zone adjustments will no longer result in invalid dates.
This commit is contained in:
Mark Stacey 2022-07-18 13:33:58 -04:00 committed by GitHub
parent 3ddebf818b
commit 0457d54c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,10 @@ function createZipTask(platform, buildType, version) {
gulp.src(`dist/${platform}/**`),
// sort files and set `mtime` to epoch to ensure zip build is deterministic
sort(),
gulpZip(`${path}.zip`, { modifiedTime: new Date(0) }),
// Modified time set to an arbitrary static date to ensure build the is reproducible.
// The date chosen is MetaMask's birthday. Originally we chose the Unix epoch, but this
// resulted in invalid dates on certain timezones/operating systems.
gulpZip(`${path}.zip`, { modifiedTime: new Date('2016-07-14T00:00:00') }),
gulp.dest('builds'),
);
};