I am trying to query all of the Users that share a common time zone offset (so I can send them an email at a particular time everyday), and can not figure it out!
How do I get a list of the time zone names for a particular offset? I've been tinkering with TzInfo and ActiveSupport::TimeZone.zones_map with limited success.
Am I taking the wrong approach here? I was thinking I could store the GMT offset on the user instead, and query that way?
figured it out:
I am trying to query all of the Users that share a common time zone offset (so I can send them an email at a particular time everyday), and can not figure it out!
User.where(:time_zone => ['list','of time','zone names'])
How do I get a list of the time zone names for a particular offset? I've been tinkering with TzInfo and ActiveSupport::TimeZone.zones_map with limited success.
Am I taking the wrong approach here? I was thinking I could store the GMT offset on the user instead, and query that way?
My google-fu has let me down on this one.