diff --git a/analyticsApi/main.go b/analyticsApi/main.go index 17e8665..498372e 100644 --- a/analyticsApi/main.go +++ b/analyticsApi/main.go @@ -45,7 +45,7 @@ import ( // "count": , // "last_30_days_data": [ // { -// "date": "YYYY-MM-DDTHH:MM:SSZ", +// "date": , // "count": // }, // ... @@ -104,7 +104,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) { WHERE created >= {:startDate} `). Bind(dbx.Params{ - "startDate": startDate.Format("2006-01-02 15:04:05"), + "startDate": startDate, }). Row(&totalItems) @@ -147,7 +147,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) { ) FROM ( SELECT - strftime('%m/%d/%Y %H:%M:%S %Z', created) AS date, + strftime('%Y-%m-%dT%H:%M:%SZ', created) AS date, COUNT(id) AS daily_count FROM analyticsPageViews WHERE