how to get client timezone in datetime widget? | Community
Skip to main content
October 16, 2015
Solved

how to get client timezone in datetime widget?

  • October 16, 2015
  • 2 replies
  • 829 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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

October 16, 2015

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