Don't bother with figuring out the differences between timezones. That's not necessary.
Whenever the user accesses a page, update a field in their record of the Users table last-updated-time. Then do a query for all users having a last-updated-time within the last 5 minutes. Anything more than this, and they are considered "offline."
If you use your server-time, via the NOW() function in MySQL, you'll side-step calculating differences between timezones.
This is the standard way of tracking how many users are presently online (Meaning, active within the last couple of minutes).
Constantly Updated
If you would like to know they are still active even when they're not jumping from page to page, include a bit of javascript to ping your server every 60 seconds or so to let you know they are still alive. It'll work the same way as my original suggestion, but it will update your records without requiring them to be frantically browsing your site at least once every five minutes.
setInterval("imStillAlive()", 60000);
function imStillAlive() {
/* Posts to updatestatus.php which updates
their last_activity_time field within the
user table on their record */
$.post("/updatestatus.php"); #jQuery's $.post method
}