Have you ever had that request?
I would like to have the distribution of clicks per hour for the last week in local time
It’s a no brainer if your database server is in the same time zone as your business audience – then you just need to aggreate the clicks’ timestamps to an hour.
Not sure how to do this?
If, however, the database server is located in a timezone different from the one where your audience is, then you’ll have to do some extra work on your query
This is another case when those functions come in handy
So, assuming your servers are located in New York and business audience is based in Los Angeles, Chicago, London, Paris and Sofia, your calculation will look in one of the following ways, depending on the database