Get browser's timezone offset

0
0

Sorry if I missed something obvious — what’s the best way to run some JS code on the client, and access the return value server-side?

var offset = new Date().getTimezoneOffset();

Or better yet, this: https://bitbucket.org/pellepim/jstimezonedetect (jstz object)

Thanks.

 

 

  • You must to post comments
0
0

Hi Andrew,

you can find a sample using jstz and the different options to integrate it into Wisej here:

http://wisej.s3.amazonaws.com/support/attachments/Wisej.JavaScriptCallbacks.zip

Few notes:

  • The jstz library is loaded in default.html
  • The window executes javascript at loading using the JavaScript extender, see the JavaScript property in the designer
  • The two buttons execute javascript in the context of the form
  • Please make sure to use the latest dev build (1.3.17) as we needed to fix issue WJ-7890 to make it work.

Best regards
Frank

 

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.