I create some basic analytics for my site. A registered user has their own page. I provide them with some basic analytics for page views: View count, referrer, browser, OS and country. The user can filter by hour, day, week, month and all. I aggregate all views for the day and then for the month. The problem I have is the data is being stored with UTC timezone which is fine until I start to aggregate the data. Eg. A UTC day is different to an EST day, which means the analytics is not be correct for a user outside the UTC timezone when filtered by week, month and all.
The reason I'm aggregating the views is so the views table doesn't get too big. All views for the day are condensed into one row for a specific page and then again condensed into one row for the month.
How can I solve this problem?