Question: I am working on a cron job which sends report to hundreds of users around the world. The cron should send an email to all my users at exactly 12am in the morning according to their timezone. Thanks in advance

Answer: 
```
Your Time | Timezone You Need
-----------------------------
12:00am     0
1:00am      -1
2:00am      -2
3:00am      -3
4:00am      -4
5:00am      -5
...
12:00pm     +/- 12
1:00pm      +11
2:00pm      +10
3:00pm      +9
...
------------------------------

```

You should be able to see the pattern start to develop here. The pattern should end up being something like Timezone Difference = (12-your current hour)
Figure out what timezone you are in:

```
time("O");

```

Figure out what the time is where you are:

```
time("H:i")

```

Do some magic to work out whether you should be adding or subtracting time to get to midnight, then add or subtract the difference between your time and midnight to get the timezone difference, and add it to your own timezone. Voila.

**Edit:** See @TheTXI's answer for the 'magic' involved