dan.laffan said 3 months ago on Daylight Savings :
I wonder if it would be viable to do the following:
  • Add time_zone to users.
  • Have some table/column that opts the user into receiving the report.
  • Schedule the report to run twice an hour (at h:00 and h:30 to support time zones that are X hours and 30 minutes off UTC).
  • Tell the report to find the users whose local time-zone hour equals the report's scheduled time/hour, and a similar check for the minutes.

I can't quite think of a way of quickly selecting all users in a single query whose local time hours and minutes match, but maybe a find_each that pulls back just the user ID and the time_zone might make it doable for a large data set.  

Anyone with other ideas please jump in.