I have a bunch of events stored in my database. Each event has a start time, stored as DATETIME
in UTC. Each user can choose his/her own timezone.
I want to display a calendar which just shows the number of events on each day of the month. I can't GROUP BY DATE(start_dt)
because the user's day does not [necessarily] start at 00:00:00 UTC. Moreover, the user's timezone may have a DST switch in the middle of the month.
Is my only option then to fetch every single event for the given month and then group and count them with my server-side language?