There's not really an easy way to do this in PHP, since everything is executed on the server. PHP really has no idea what time it is on the client's computer.
The only way I can think to do it is to have users specify a timezone upon signup. Most of the popular forums do that (including this one, I believe), so that they can display times correctly for every user.
Edit: Of course, you could always do something with Javascript to display the correct time. But if you wanted to do calculations in PHP with the local time, then you're pretty much restricted to them choosing a time zone.