[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

Can java/Javascript read the enduser's PC timezone ?

Guys ,

Can javascript/Java read the user's (end user who visits your web application) PC timezone. (for e.g. "America/Newyork" or abbrevations like "EST"  , "MUT")

I tried with getTimezoneOffset() but that only gives an offset component .

Thanks,
Ajay.  
0
jnajayjain
Asked:
jnajayjain
3 Solutions
 
CEHJCommented:
You could maybe parse Date.toLocaleString
0
 
jnajayjainAuthor Commented:
This will work on Date object on server m/c . I require timezone information on client m/c.
0
 
CEHJCommented:
No - you need to call that on the client and have it sent to the server
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Mayank SAssociate Director - Product EngineeringCommented:
If its on a web application and you are running this on the browser, you need to use Javascript, not Java. Better to ask on the Javascript TA.
0
 
kawasCommented:
http://www.htmlgoodies.com/beyond/javascript/article.php/3472371

shows how to get the time using javascript. you could then send this info to the server.
0
 
kawasCommented:
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now