How is difficulty calculated in PPS payments?

We pay for PPS shares by hourly average difficulty.

For example, if the difficulty is 100 at 1:00 AM and increases to 200 at 1:30 AM. Then we pay for shares from 1:00 AM to 1:59 AM at 150 difficulty.