fix: fix telemetry lost timezone problem
This commit is contained in:
parent
ceef5c4b71
commit
40e1bac541
@ -158,7 +158,16 @@ export const telemetryRouter = router({
|
|||||||
)
|
)
|
||||||
.output(z.object({ pageviews: z.any(), sessions: z.any() }))
|
.output(z.object({ pageviews: z.any(), sessions: z.any() }))
|
||||||
.query(async ({ input }) => {
|
.query(async ({ input }) => {
|
||||||
const { telemetryId, startAt, endAt, url, country, region, city } = input;
|
const {
|
||||||
|
telemetryId,
|
||||||
|
startAt,
|
||||||
|
endAt,
|
||||||
|
timezone,
|
||||||
|
url,
|
||||||
|
country,
|
||||||
|
region,
|
||||||
|
city,
|
||||||
|
} = input;
|
||||||
|
|
||||||
const startDate = new Date(startAt);
|
const startDate = new Date(startAt);
|
||||||
const endDate = new Date(endAt);
|
const endDate = new Date(endAt);
|
||||||
@ -174,6 +183,7 @@ export const telemetryRouter = router({
|
|||||||
startDate,
|
startDate,
|
||||||
endDate,
|
endDate,
|
||||||
unit: input.unit,
|
unit: input.unit,
|
||||||
|
timezone,
|
||||||
url,
|
url,
|
||||||
country,
|
country,
|
||||||
region,
|
region,
|
||||||
@ -216,8 +226,17 @@ export const telemetryRouter = router({
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
.query(async ({ input }) => {
|
.query(async ({ input }) => {
|
||||||
const { telemetryId, type, startAt, endAt, url, country, region, city } =
|
const {
|
||||||
input;
|
telemetryId,
|
||||||
|
type,
|
||||||
|
startAt,
|
||||||
|
endAt,
|
||||||
|
timezone,
|
||||||
|
url,
|
||||||
|
country,
|
||||||
|
region,
|
||||||
|
city,
|
||||||
|
} = input;
|
||||||
|
|
||||||
const startDate = new Date(startAt);
|
const startDate = new Date(startAt);
|
||||||
const endDate = new Date(endAt);
|
const endDate = new Date(endAt);
|
||||||
@ -231,6 +250,7 @@ export const telemetryRouter = router({
|
|||||||
const filters = {
|
const filters = {
|
||||||
startDate,
|
startDate,
|
||||||
endDate,
|
endDate,
|
||||||
|
timezone,
|
||||||
url,
|
url,
|
||||||
country,
|
country,
|
||||||
region,
|
region,
|
||||||
|
Loading…
Reference in New Issue
Block a user