refactor: date utils and all calls
This commit is contained in:
@@ -3,6 +3,7 @@ import { exec } from 'child_process';
|
||||
import { promisify } from 'util';
|
||||
import path from 'path';
|
||||
import { createHash } from 'crypto';
|
||||
import { formatDateForDisplay, getToday } from './date-utils';
|
||||
|
||||
const execAsync = promisify(exec);
|
||||
|
||||
@@ -184,7 +185,7 @@ export class BackupUtils {
|
||||
extra?: { hash?: string; size?: number; previousHash?: string }
|
||||
): Promise<void> {
|
||||
try {
|
||||
const date = new Date().toLocaleString('fr-FR');
|
||||
const date = formatDateForDisplay(getToday(), 'DISPLAY_LONG');
|
||||
|
||||
let logEntry = `[${date}] ${type.toUpperCase()} BACKUP ${action.toUpperCase()}: ${details}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user