fix further bugs
This commit is contained in:
@@ -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 ...');
|
||||
|
||||
Reference in New Issue
Block a user