Skip to content

Commit

Permalink
Update log export filenames to use locale timestamps instead of UTC (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kofi-q authored Oct 24, 2024
1 parent 0f4c8ae commit 9a6fd8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/backend/src/system_call/export_logs_to_usb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { createReadStream, createWriteStream } from 'node:fs';
import { pipeline } from 'node:stream/promises';
import { createGunzip, createGzip } from 'node:zlib';
import { dirSync } from 'tmp';
import { generateFileTimeSuffix } from '@votingworks/utils';
import { execFile } from '../exec';

const LOG_DIR = '/var/log/votingworks';
Expand Down Expand Up @@ -129,8 +130,7 @@ async function exportLogsToUsbHelper({

const machineNamePath = join(status.mountPoint, `/logs/machine_${machineId}`);

const dateString = new Date().toISOString().replaceAll(':', '-');
const destinationDirectory = join(machineNamePath, dateString);
const destinationDirectory = join(machineNamePath, generateFileTimeSuffix());
const tempDirectory = dirSync().name;

switch (format) {
Expand Down

0 comments on commit 9a6fd8e

Please sign in to comment.