How to get client\'s timezone?

Answer

Check out  by setting a Cookie through JavaScript that will hold the client's timezone. It's rather lenghty, but that is because it is quite verbose. I've implemented a solution along these lines in one of my own apps and it works quite well.

You could also send the timezone via Ajax to the server and have it do whatever you need to do it with then. Or, if you are not doing any serverside calculations with it, just apply the timezone client side where needed. Really depends on your usecase.

In addition to that, I suggest you let the visitor set his timezone himself and store that in the Cookie or a Session.


All zend-framework Questions

Ask your interview questions on zend-framework

Write Your comment or Questions if you want the answers on zend-framework from zend-framework Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---