From 91e79ff0b76223bdad37d18f28e2ef8d7a514bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20=C3=81ngel?= Date: Wed, 13 Mar 2019 17:54:07 +0100 Subject: [PATCH] Get browser timezone for reporting --- public/services/reporting.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/services/reporting.js b/public/services/reporting.js index 4a195b0db..38aeae932 100644 --- a/public/services/reporting.js +++ b/public/services/reporting.js @@ -11,7 +11,7 @@ */ import $ from 'jquery'; - +import moment from 'moment' export class ReportingService { constructor( $rootScope, @@ -55,7 +55,9 @@ export class ReportingService { const array = await this.vis2png.checkArray(idArray); const name = `wazuh-${ isAgents ? 'agents' : 'overview' - }-${tab}-${(Date.now() / 1000) | 0}.pdf`; + }-${tab}-${(Date.now() / 1000) | 0}.pdf`; + + const browserTimezone = moment.tz.guess(true); const data = { array, @@ -67,7 +69,8 @@ export class ReportingService { tables: appliedFilters.tables, tab, section: isAgents ? 'agents' : 'overview', - isAgents + isAgents, + browserTimezone }; await this.genericReq.request('POST', '/reports', data);