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.
feature/default_network_editable
Mark Stacey 2 years ago committed by GitHub
parent 3ddebf818b
commit 0457d54c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      development/build/etc.js

@ -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'),
);
};

Loading…
Cancel
Save