feat: allow timezone offset for summary reports

This commit is contained in:
Shivam Mishra
2026-03-05 14:34:03 +05:30
parent 47fc8072ad
commit 8c98b619bd
2 changed files with 8 additions and 1 deletions
@@ -1,6 +1,8 @@
/* global axios */
import ApiClient from './ApiClient';
const getTimeOffset = () => -new Date().getTimezoneOffset() / 60;
class SummaryReportsAPI extends ApiClient {
constructor() {
super('summary_reports', { accountScoped: true, apiVersion: 'v2' });
@@ -12,6 +14,7 @@ class SummaryReportsAPI extends ApiClient {
since,
until,
business_hours: businessHours,
timezone_offset: getTimeOffset(),
},
});
}
@@ -22,6 +25,7 @@ class SummaryReportsAPI extends ApiClient {
since,
until,
business_hours: businessHours,
timezone_offset: getTimeOffset(),
},
});
}
@@ -32,6 +36,7 @@ class SummaryReportsAPI extends ApiClient {
since,
until,
business_hours: businessHours,
timezone_offset: getTimeOffset(),
},
});
}
@@ -42,6 +47,7 @@ class SummaryReportsAPI extends ApiClient {
since,
until,
business_hours: businessHours,
timezone_offset: getTimeOffset(),
},
});
}