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 .

Who is Participating?
CEHJConnect With a Mentor Commented:
No - you need to call that on the client and have it sent to the server
You could maybe parse Date.toLocaleString
jnajayjainAuthor Commented:
This will work on Date object on server m/c . I require timezone information on client m/c.
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Mayank SConnect With a Mentor Associate 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.
kawasConnect With a Mentor Commented:

shows how to get the time using javascript. you could then send this info to the server.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.