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

How to set timezone offset from browser using javascript?



**
Hello,
I am trying to get the Time zone offset (or even just the Time zone for that matter) from the browser using $PROCESS$ in a set fields on an Active link on window loaded.  The problem is, I don't know _javascript_ and can't think of another way to do this without it.  I am trying to keep this dynamic, rather than pulling a static time zone from the User Preference form and looking up the offset in the Time Zone form. I was given the below _javascript_ command, but get the error below when I try to call it in the set fields. Can anyone help me out with the syntax?  TIA!

Field:
ClientTimezoneOffset__c

Value:
$PROCESS$ _javascript_:var d = new Date();var n = d.getTimezoneOffset('$ClientTimezoneOffset__c$')

Error on Window Loaded:
"Caught exception : Unable to get property 'match' of undefined or null reference";

Thank you,
Lyndsay
ARS/ITSM/Midtier 8.1
_ARSlist: "Where the Answers Are" and have been for 20 years_