I use the query below to select all timezones where the current local time is between 11 am and 1 pm.
SELECT *, (EXTRACT(HOUR FROM DATE_ADD(UTC_TIMESTAMP(), INTERVAL `utc_offset` HOUR_MINUTE))) AS `local_hour` from `timezones` HAVING `local_hour` BETWEEN 11 AND 13
The database structure and data are attached.
The query above works perfectly on time ranges that are within the same day, however I would like to be able select into the next day.
BETWEEN 22 AND 2
I want to select all times between 10 pm today and 2 am tomorrow.