mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
fix UTC issues
This commit is contained in:
parent
004ccdc22f
commit
a15d0ca94a
6 changed files with 35 additions and 21 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { getRealtimeActivity, getPageviewStats, getSessionStats } from 'queries/index';
|
||||
import { getPageviewStats, getRealtimeActivity, getSessionStats } from 'queries/index';
|
||||
|
||||
function increment(data: object, key: string) {
|
||||
if (key) {
|
||||
|
|
@ -10,9 +10,12 @@ function increment(data: object, key: string) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function getRealtimeData(websiteId: string, criteria: { startDate: Date }) {
|
||||
const { startDate } = criteria;
|
||||
const filters = { startDate, endDate: new Date(), unit: 'minute' };
|
||||
export async function getRealtimeData(
|
||||
websiteId: string,
|
||||
criteria: { startDate: Date; timezone: string },
|
||||
) {
|
||||
const { startDate, timezone } = criteria;
|
||||
const filters = { startDate, endDate: new Date(), unit: 'minute', timezone };
|
||||
const [activity, pageviews, sessions] = await Promise.all([
|
||||
getRealtimeActivity(websiteId, filters),
|
||||
getPageviewStats(websiteId, filters),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue