I have a loop that checks to see if a user's daily game has started based on time(). The event starting time is based on the GMT time that the user has chosen.
My problem is that I can't seem to work out how to get the starting time - once a day I loop through the database and create all the games for the day; if a user chooses the GMT time of 20 (for example) how do I work out the time() for the next time GMT20 occurs.
EDIT: I think the assumption here is that the daily loop is made at GMT +0, it's not. The daily loop can be anytime during the day, it happens after a certain event happens. So I need the NEXT unix timestamp where GMT +20 (for example) happens.