fix further bugs

This commit is contained in:
2024-05-16 15:57:39 -05:00
parent 327aef0f21
commit e0ecea5af2
12 changed files with 135 additions and 101 deletions

View File

@@ -3,9 +3,11 @@ const fs = require('fs');
const dayjs = require('dayjs');
const timezone = require('dayjs/plugin/timezone');
const utc = require('dayjs/plugin/utc');
var localizedFormat = require('dayjs/plugin/localizedFormat');
dayjs.extend(utc);
dayjs.extend(timezone);
dayjs.extend(localizedFormat);
const write = (content, path) => {
const writePath = path || `${process.cwd()}/src/build.ts`;
@@ -23,7 +25,10 @@ const package = require(`${process.cwd()}/package.json`);
console.log('start build.js script ...');
// Generate `build` object
const build = {};
build.timestamp = dayjs(new Date()).utc().format('DD.MM.YYYY HH:mm') + ' UTC';
const acDate = new Date();
const german = dayjs(acDate).tz('Europe/Berlin').format('DD.MM.YYYY HH:mm');
const texan = dayjs(acDate).tz('America/Chicago').format('L LT');
build.timestamp = `GER: ${german} | TX: ${texan}`;
// Write Build information to file
write(build);
console.log('build.js script finished ...');