Just pass the UTC time to the JavaScript Date() constructor. The resulting Date object will be the time in the user local time zone based on their computer settings.
var gmt = new Date('Feb, 19 2010 13:00:00 GMT'); alert(gmt);
In Chrome, the Pacific Standard Time Zone displays
Fri Feb 19 2010 05:00:00 GMT-0800 (Pacific Standard Time)
If you need this information on the server side, do not worry when asking the user for your location. Just ask them directly about the time zone. Many sites (especially forums) already do this.
source share