Expand my Community achievements bar.

SOLVED

how to get client timezone in datetime widget?

Avatar

Former Community Member

Hi I have a widget with the datetime form on it but it only takes the timezone of the server therefore always giving me not the time I need.

What can I do in order to get the client's timezone information?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Extend the widget and use JavaScript logic to get that value. There is quite a bit information on the web that talks about using JavaScript to get the client timezone. For example:

http://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript

For information about extending a CQ widget -- see: 

http://dev.day.com/docs/en/cq/current/developing/widgets.html

Hope this helps

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Extend the widget and use JavaScript logic to get that value. There is quite a bit information on the web that talks about using JavaScript to get the client timezone. For example:

http://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript

For information about extending a CQ widget -- see: 

http://dev.day.com/docs/en/cq/current/developing/widgets.html

Hope this helps

Avatar

Former Community Member

Thanks! Do you happen know where else there is another tutorials on extending CQ widgets? I find that the documentation found on that particular page to be difficult to understand for an up and learning CQ developer such as myself. smiley