[Date Prev] [Date Next] [Prev in Thread] [Next in Thread] [Date Index] [Thread Index]

Re: How to set timezone offset from browser using javascript?

Hi Lyndsay, try this and you should get the timezone offset. Note this assumes your "ClientTimezoneOffset__c" fieldid is 880880801.

var fid= '880880801';
var d = new Date(); 
document.getElementById('arid_WIN_0_' + fid).value = d.getTimezoneOffset();

The result will be in minutes from UTC (if you want hours, divide by 60).

Hope this helps,

UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"