Skip to content

Commit

Permalink
MSPB-326: Use correct offset for call logs tz header (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillegr123 authored May 15, 2023
1 parent 6c1fa2d commit ea52d27
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions submodules/callLogs/callLogs.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
define(function(require) {
var $ = require('jquery'),
_ = require('lodash'),
jstz = require('jstz'),
monster = require('monster');
monster = require('monster'),
moment = require('moment');

var app = {
requests: {},
Expand Down Expand Up @@ -53,14 +53,15 @@ define(function(require) {
toDate = dates.to;
}

var dataTemplate = {
timezone: 'GMT' + jstz.determine_timezone().offset(),
type: type || 'today',
fromDate: fromDate,
toDate: toDate,
showFilteredDates: ['thisMonth', 'thisWeek'].indexOf(type) >= 0,
showReport: monster.config.whitelabel.callReportEmail ? true : false
};
var tz = monster.util.getCurrentTimeZone(),
dataTemplate = {
timezone: 'GMT' + moment().tz(tz).format('Z'),
type: type || 'today',
fromDate: fromDate,
toDate: toDate,
showFilteredDates: ['thisMonth', 'thisWeek'].indexOf(type) >= 0,
showReport: monster.config.whitelabel.callReportEmail ? true : false
};

self.callLogsGetCdrs(fromDate, toDate, function(cdrs, nextStartKey) {
cdrs = self.callLogsFormatCdrs(cdrs);
Expand Down

0 comments on commit ea52d27

Please sign in to comment.