diff --git a/analyticsApi/main.go b/analyticsApi/main.go index c42f357..17e8665 100644 --- a/analyticsApi/main.go +++ b/analyticsApi/main.go @@ -147,7 +147,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) { ) FROM ( SELECT - strftime('%Y-%m-%d', created) AS date, + strftime('%m/%d/%Y %H:%M:%S %Z', created) AS date, COUNT(id) AS daily_count FROM analyticsPageViews WHERE @@ -163,7 +163,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) { LIMIT {:perPage} OFFSET {:offset} `). Bind(dbx.Params{ - "startDate": startDate.Format("2006-01-02 15:04:05"), + "startDate": startDate, "perPage": perPage, "offset": offset, }).