It works now :) I didn't know what to do with $offset_set variable earlier. Your solution makes it very clear :)
In reply to Re^4: User's time by kiat in thread User's time by kiat