WhatsNew: Save build creation time, use as displayed date

This commit is contained in:
Scott Nonnenberg 2021-09-13 12:00:32 -07:00 committed by GitHub
parent 240585ef94
commit 29a3a2ac58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 3 deletions

View file

@ -13,6 +13,7 @@ try {
const semver = require('semver');
const _ = require('lodash');
const { strictAssert } = require('./ts/util/assert');
const { parseIntWithFallback } = require('./ts/util/parseIntWithFallback');
// It is important to call this as early as possible
require('./ts/windows/context');
@ -58,6 +59,7 @@ try {
window.getEnvironment = getEnvironment;
window.getAppInstance = () => config.appInstance;
window.getVersion = () => config.version;
window.getBuildCreation = () => parseIntWithFallback(config.buildCreation, 0);
window.getExpiration = () => {
const sixtyDays = 60 * 86400 * 1000;
const remoteBuildExpiration = window.storage.get('remoteBuildExpiration');