1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 04:40:20 +01:00

Do not use UTC for alpha version

This commit is contained in:
kkapsner 2023-05-30 13:48:25 +02:00
parent fc5cce23ea
commit df039b0f3c

View File

@ -16,8 +16,13 @@ const fs = require("fs");
function getAlphaVersion(manifest, useTime){
"use strict";
function f(n){
if (n < 10) return "0" + n.toString(10);
return n.toString(10);
}
const now = new Date();
const date = now.toISOString().substring(0, useTime? 13: 10).replace(/-/g, "").replace("T", ".");
// const date = now.toISOString().substring(0, useTime? 13: 10).replace(/-/g, "").replace("T", ".");
const date = `${now.getFullYear()}${f(now.getMonth() + 1)}${f(now.getDate())}${useTime? "." + f(now.getHours): ""}`;
return manifest.version.replace(/^([\d.]+).*$/, "$1Alpha" + date);
}
function getRCVersion(manifest){