I guess the baseline for your times will be the timezone which your server is in. All dates/times within the system should probably be stored in relation to that.
If when registering you ask your users what their timezone is then you could create a function to translate a date/time from your local time into theirs and use this function at every point where you process dates/times, possible by simply adding or subtracting a certain number of seconds from the local date/time.
This would work reasonably well but you would also have to allow for changes in the timezones differences due to the application of schemes such as British Summer Time, Daylight savings time etc...
Another possible solution would be to store a list of timezones and periodically adjust the differences between them by checking their local times using SNTP servers at each locale. The code to do this is easily available (at least in perl it is) and all you would need to do is to find the required servers and then at a certain time of each day (or hourly, or whatever) query the server and check the local times.
You could also do this each time a user logs in and simply keep track of the difference between their local time and yours.
I do not however know of a way of finding the users timezone without actually asking them.