Fix git date

This commit is contained in:
Travis Shivers 2020-07-24 15:15:15 -05:00
parent 4f905bf193
commit d28b6088c4
No known key found for this signature in database
GPG Key ID: EE4CC2891B8FCD33
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ export default {
},
date() {
return new Date(parseInt(process.env.VUE_APP_GIT_DATE, 10));
return new Date(parseInt(process.env.VUE_APP_GIT_DATE, 10) * 1000);
},
updatedAt() {

View File

@ -18,7 +18,7 @@ try {
} catch (e) {
// Sometimes on CI stuff they build with .git being present
// TODO: find better way to do this
process.env.VUE_APP_GIT_DATE = process.env.VUE_APP_GIT_DATE || Date.now();
process.env.VUE_APP_GIT_DATE = process.env.VUE_APP_GIT_DATE || Math.floor(Date.now() / 1000);
if (process.env.SOURCE_COMMIT) {
process.env.VUE_APP_GIT_HASH = process.env.VUE_APP_GIT_HASH