The real problem is that there is no universal answer, since the offset changes at least twice per year in places that observe daylight saving time, and the rules for it can change at any time at the whim of the local government.
This will give you an idea of the various rules in use around the world:http://www.timeanddate.com/time/dst/2010a.html
Also, the time offset is ambiguous. On the day the time changes to set the time back one hour, you actually have the same local time twice with two different offsets to UTC time.
We store dates of the time offsets for each time zone of interest in a table and do lookups to do the conversion.
This works OK if you are only interested in the difference right now. If you are dealing with datetimes in the past or future, you will have to use a different method, like a lookup table.