diff --git a/src/modules/catalog/catalog.service.ts b/src/modules/catalog/catalog.service.ts index a3db9cc..e8282ee 100644 --- a/src/modules/catalog/catalog.service.ts +++ b/src/modules/catalog/catalog.service.ts @@ -110,8 +110,16 @@ class CatalogService implements OnModuleInit { 'pdf': 'application/pdf' } - const timestamp = new Date().toISOString().replace(/[:.]/g, '-'); - const filename = `relatorio-pii-${timestamp}.${type}`; + const date = new Date() + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + const hours = String(date.getHours()).padStart(2, '0'); + const minutes = String(date.getMinutes()).padStart(2, '0'); + const seconds = String(date.getSeconds()).padStart(2, '0'); + + const timestamp = `${year}${month}${day}_${hours}${minutes}${seconds}`; + const filename = `dadosfera_pii_report_${timestamp}.${type}`; return { file,